{"_id":"554559a635b2240d00838915","__v":35,"parentDoc":null,"project":"54d53c7b23010a0d001aca0c","user":"54cfa8e1a8a4fd0d00b7fd1d","version":{"_id":"54d5635532d98b0d00384afb","project":"54d53c7b23010a0d001aca0c","__v":10,"forked_from":"54d53c7c23010a0d001aca0f","createdAt":"2015-02-07T00:59:01.934Z","releaseDate":"2015-02-07T00:59:01.934Z","categories":["54d5635632d98b0d00384afc","54d5635632d98b0d00384afd","54d5635632d98b0d00384afe","54d5635632d98b0d00384aff","54d5635632d98b0d00384b00","54d5635632d98b0d00384b01","54d5635632d98b0d00384b02","54d652097e05890d006f153e","54dd1315ca1e5219007e9daa","54e21e2b22de1c230094b147","54e68e62a43fe13500db3879","54fa1d3fe7a0ba2f00306309","551c453a23a1ee190034d19a","551df586e52a0b23000c62b6","551f39be6886f8230055f02a","55a6720751457325000e4d97"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"0.1.0","version":"0.1"},"category":{"_id":"54d5635632d98b0d00384b00","pages":["54d5635732d98b0d00384b17","54ef76a36ce8d81900c1c3dd","554559a635b2240d00838915","5624bfd26ff1010d009b15f9"],"project":"54d53c7b23010a0d001aca0c","version":"54d5635532d98b0d00384afb","__v":4,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-02-06T23:56:35.650Z","from_sync":false,"order":1,"slug":"development-workflow","title":"Development Workflow"},"updates":["57b378efb67e1e0e00958a0b"],"next":{"pages":[],"description":""},"createdAt":"2015-05-02T23:11:34.662Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"The Cloud9 Command Line Interace (or CLI) provides a way to interact with the cloud9 platform. It has a [pluggable architecture](https://github.com/c9/core/blob/master/plugins/c9.cli.open/open.js) and the goal is to extend the cli with functionality that makes it easy to interact with all aspects of the cloud9 platform. Currently it has plugins to publish, build and install packages and to open files from the command line.\n\n# installation\n\nc9 comes preinstalled on hosted cloud9 workspaces. To install it on other computers run \n\n```\nnpm install -g c9\n```\n\n# c9 --help\n\nThe `c9 --help` command will list usage information.\n\n```\nThe Cloud9 CLI.\nUsage: c9 [--verbose] <command> [<args>]\n\nThe most commonly used c9 commands are:\n    publish     Publishes a cloud9 package.\n    build       Builds development version of package to load in non-debug mode.\n    unpublish   Disables a cloud9 package.\n    list        Lists all available packages.\n    open        Opens a file or directory.\n    restart     Restarts the currently running Cloud9\n    install     Installs a cloud9 package.\n    remove      Removes a cloud9 package.\n\nOptions:\n  --verbose, -v  Output more information  [default: false]\n```\n\nEach command has usage information of it's own. Type `c9 <command> --help` to get a listing of usage information for that command.\n\n# c9 publish\n\nThe `c9 publish` command builds and then publishes the current directory as a package to the c9.io repository to make it available in the Cloud9 Package Browser. Learn more about publishing packages in [this guide](doc:publishing-packages).\n\n```\nThe Cloud9 CLI.\nUsage: c9 publish [--help] [--verbose] [--force] [<newversion> | major | minor | patch | build]\n\nOptions:\n  --verbose, -v  Output more information               [default: false]\n  --force, -f    Ignore warnings                       [default: false]\n  --dry-run      Only build a test version             [default: false]\n  --tag, -t      Create git tag for published version  [default: false]\n  --help, -h     Output help information             \n```\n\n# c9 build\n\nThe `c9 build` builds a package without publishing it. Use the `--devel` flag to build a version that is not packed and can be used for testing the package with uncompressed files.\n\n```\nThe Cloud9 CLI.\nUsage: c9 build [--help] [--devel]\n\nOptions:\n  --help, -h   Output help information\n  --devel, -d                           [default: false]\n```\n\n# c9 unpublish\n\nThe `c9 unpublish` command disables a plugin in the package browser. It doesn't uninstall the plugin from workspaces that already have it installed.\n\n```\nThe Cloud9 CLI.\nUsage: c9 unpublish [--help] [--verbose]\n\nOptions:\n  --verbose, -v  Output more information  [default: false]\n  --help, -h     Output help information\n```\n\n# c9 list\n\nThe `c9 list` command lists the plugins published to the c9.io repository. This is a temporary plugin available during the alpha of the SDK. The `--json` flag outputs a list of json objects with the public information describing the packages.\n\n```\nThe Cloud9 CLI.\nUsage: c9 list [--help] [--json]\n\nOptions:\n  --help, -h  Output help information\n  --json                               [default: false]\n```\n\n# c9 open\n\nThe `c9 open` command opens files and directories in the IDE.\n[block:html]\n{\n  \"html\": \"<object id=\\\"scPlayer\\\" class=\\\"embeddedObject\\\" width=\\\"735\\\" height=\\\"607\\\" type=\\\"application/x-shockwave-flash\\\" data=\\\"http://content.screencast.com/users/RubenJav/folders/Jing/media/8e78da5b-23c4-4a06-985d-2bd7d8e254e4/jingswfplayer.swf\\\" >\\n\\t<param name=\\\"movie\\\" value=\\\"http://content.screencast.com/users/RubenJav/folders/Jing/media/8e78da5b-23c4-4a06-985d-2bd7d8e254e4/jingswfplayer.swf\\\" />\\n\\t<param name=\\\"quality\\\" value=\\\"high\\\" />\\n\\t<param name=\\\"bgcolor\\\" value=\\\"#FFFFFF\\\" />\\n\\t<param name=\\\"flashVars\\\" value=\\\"containerwidth=1061&containerheight=871&thumb=http://content.screencast.com/users/RubenJav/folders/Jing/media/8e78da5b-23c4-4a06-985d-2bd7d8e254e4/FirstFrame.jpg&content=http://content.screencast.com/users/RubenJav/folders/Jing/media/8e78da5b-23c4-4a06-985d-2bd7d8e254e4/00002796.swf&blurover=false\\\" />\\n\\t<param name=\\\"allowFullScreen\\\" value=\\\"true\\\" />\\n\\t<param name=\\\"scale\\\" value=\\\"showall\\\" />\\n\\t<param name=\\\"allowScriptAccess\\\" value=\\\"always\\\" />\\n\\t<param name=\\\"base\\\" value=\\\"http://content.screencast.com/users/RubenJav/folders/Jing/media/8e78da5b-23c4-4a06-985d-2bd7d8e254e4/\\\" />\\n</object>\"\n}\n[/block]\n```\nThe Cloud9 CLI.\nUsage: c9 open [--help] [--wait] <path>\n\nOptions:\n  --wait      Wait until the file(s) are closed  [default: false]\n  --help, -h  Output help information          \n```\n\n# c9 restart\n\nThe `c9 restart` command is used for the [Cloud9 Desktop](doc:running-cloud9-desktop) and will restart a running instance.\n\n```\nThe Cloud9 CLI.\nUsage: c9 restart [--help]\n\nOptions:\n  --help, -h  Output help information\n```\n\n# c9 install\n\nThe `c9 install` command installs packages into a workspace, the SDK and [desktop version of Cloud9](doc:running-cloud9-desktop). The `--local` flag installs a package locally without registering it in the database.The `--global` flag installs a package for all workspaces on c9.io. The `--debug` flag clones repositories from open source packages to edit and debug them. Learn more about publishing packages in [this guide](doc:installing-packages).\n\n```\nThe Cloud9 CLI.\nUsage: c9 install [--help] [--verbose] [--force] [--global] [--local] [--debug] [<package>[:::at:::<version>] | . ]\n\nOptions:\n  --verbose, -v  Output more information  [default: false]\n  --force, -f    Ignore warnings          [default: false]\n  --help, -h     Output help information\n  --local                                 [default: false]\n  --global                                [default: false]\n  --debug                                 [default: false]\n  --package                               [default: false]\n```\n\n# c9 remove\n\nThe `c9 remove` command uninstalls packages. Similarly to `c9 install` you can uninstall them `globally` and `locally` as well.\n\n```\nThe Cloud9 CLI.\nUsage: c9 remove [--help] [--verbose] [--global] [--local] <package>\n\nOptions:\n  --verbose, -v  Output more information  [default: false]\n  --help, -h     Output help information\n  --local                                 [default: false]\n  --global                                [default: false]\n```","excerpt":"","slug":"the-cloud9-cli","type":"basic","title":"The Cloud9 CLI"}
The Cloud9 Command Line Interace (or CLI) provides a way to interact with the cloud9 platform. It has a [pluggable architecture](https://github.com/c9/core/blob/master/plugins/c9.cli.open/open.js) and the goal is to extend the cli with functionality that makes it easy to interact with all aspects of the cloud9 platform. Currently it has plugins to publish, build and install packages and to open files from the command line. # installation c9 comes preinstalled on hosted cloud9 workspaces. To install it on other computers run ``` npm install -g c9 ``` # c9 --help The `c9 --help` command will list usage information. ``` The Cloud9 CLI. Usage: c9 [--verbose] <command> [<args>] The most commonly used c9 commands are: publish Publishes a cloud9 package. build Builds development version of package to load in non-debug mode. unpublish Disables a cloud9 package. list Lists all available packages. open Opens a file or directory. restart Restarts the currently running Cloud9 install Installs a cloud9 package. remove Removes a cloud9 package. Options: --verbose, -v Output more information [default: false] ``` Each command has usage information of it's own. Type `c9 <command> --help` to get a listing of usage information for that command. # c9 publish The `c9 publish` command builds and then publishes the current directory as a package to the c9.io repository to make it available in the Cloud9 Package Browser. Learn more about publishing packages in [this guide](doc:publishing-packages). ``` The Cloud9 CLI. Usage: c9 publish [--help] [--verbose] [--force] [<newversion> | major | minor | patch | build] Options: --verbose, -v Output more information [default: false] --force, -f Ignore warnings [default: false] --dry-run Only build a test version [default: false] --tag, -t Create git tag for published version [default: false] --help, -h Output help information ``` # c9 build The `c9 build` builds a package without publishing it. Use the `--devel` flag to build a version that is not packed and can be used for testing the package with uncompressed files. ``` The Cloud9 CLI. Usage: c9 build [--help] [--devel] Options: --help, -h Output help information --devel, -d [default: false] ``` # c9 unpublish The `c9 unpublish` command disables a plugin in the package browser. It doesn't uninstall the plugin from workspaces that already have it installed. ``` The Cloud9 CLI. Usage: c9 unpublish [--help] [--verbose] Options: --verbose, -v Output more information [default: false] --help, -h Output help information ``` # c9 list The `c9 list` command lists the plugins published to the c9.io repository. This is a temporary plugin available during the alpha of the SDK. The `--json` flag outputs a list of json objects with the public information describing the packages. ``` The Cloud9 CLI. Usage: c9 list [--help] [--json] Options: --help, -h Output help information --json [default: false] ``` # c9 open The `c9 open` command opens files and directories in the IDE. [block:html] { "html": "<object id=\"scPlayer\" class=\"embeddedObject\" width=\"735\" height=\"607\" type=\"application/x-shockwave-flash\" data=\"http://content.screencast.com/users/RubenJav/folders/Jing/media/8e78da5b-23c4-4a06-985d-2bd7d8e254e4/jingswfplayer.swf\" >\n\t<param name=\"movie\" value=\"http://content.screencast.com/users/RubenJav/folders/Jing/media/8e78da5b-23c4-4a06-985d-2bd7d8e254e4/jingswfplayer.swf\" />\n\t<param name=\"quality\" value=\"high\" />\n\t<param name=\"bgcolor\" value=\"#FFFFFF\" />\n\t<param name=\"flashVars\" value=\"containerwidth=1061&containerheight=871&thumb=http://content.screencast.com/users/RubenJav/folders/Jing/media/8e78da5b-23c4-4a06-985d-2bd7d8e254e4/FirstFrame.jpg&content=http://content.screencast.com/users/RubenJav/folders/Jing/media/8e78da5b-23c4-4a06-985d-2bd7d8e254e4/00002796.swf&blurover=false\" />\n\t<param name=\"allowFullScreen\" value=\"true\" />\n\t<param name=\"scale\" value=\"showall\" />\n\t<param name=\"allowScriptAccess\" value=\"always\" />\n\t<param name=\"base\" value=\"http://content.screencast.com/users/RubenJav/folders/Jing/media/8e78da5b-23c4-4a06-985d-2bd7d8e254e4/\" />\n</object>" } [/block] ``` The Cloud9 CLI. Usage: c9 open [--help] [--wait] <path> Options: --wait Wait until the file(s) are closed [default: false] --help, -h Output help information ``` # c9 restart The `c9 restart` command is used for the [Cloud9 Desktop](doc:running-cloud9-desktop) and will restart a running instance. ``` The Cloud9 CLI. Usage: c9 restart [--help] Options: --help, -h Output help information ``` # c9 install The `c9 install` command installs packages into a workspace, the SDK and [desktop version of Cloud9](doc:running-cloud9-desktop). The `--local` flag installs a package locally without registering it in the database.The `--global` flag installs a package for all workspaces on c9.io. The `--debug` flag clones repositories from open source packages to edit and debug them. Learn more about publishing packages in [this guide](doc:installing-packages). ``` The Cloud9 CLI. Usage: c9 install [--help] [--verbose] [--force] [--global] [--local] [--debug] [<package>[@<version>] | . ] Options: --verbose, -v Output more information [default: false] --force, -f Ignore warnings [default: false] --help, -h Output help information --local [default: false] --global [default: false] --debug [default: false] --package [default: false] ``` # c9 remove The `c9 remove` command uninstalls packages. Similarly to `c9 install` you can uninstall them `globally` and `locally` as well. ``` The Cloud9 CLI. Usage: c9 remove [--help] [--verbose] [--global] [--local] <package> Options: --verbose, -v Output more information [default: false] --help, -h Output help information --local [default: false] --global [default: false] ```