From f62ee05333b141539a8e851c620dd2e82ff06860 Mon Sep 17 00:00:00 2001 From: Clay Carpenter Date: Thu, 21 May 2015 01:52:39 +0000 Subject: doc: warn about the use of the API --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index edf13bda3..15040e1b0 100644 --- a/README.md +++ b/README.md @@ -129,8 +129,11 @@ you have chosen. ## Using npm Programmatically -If you would like to use npm programmatically, you can do that. -It's not very well documented, but it *is* rather simple. +Although npm can be used programmatically, the CLI's API is meant for use by the CLI *only*, and no guarantees are made regarding its fitness for any other purpose. The semantic version of npm refers the the CLI itself, rather than the underlying API. The CLI API will not necessarily remain stable even though the NPM semver indicates no breaking changes have been made. + +If you want to use npm to reliably perform some task, the safest thing to do is to invoke the `npm` command with appropriate arguments. + +If you still would like to use npm programmatically, it is possible. The API is neither very well documented nor guaranteed to be stable, but it *is* rather simple. Most of the time, unless you actually want to do all the things that npm does, you should try using one of npm's dependencies rather than -- cgit v1.2.3