{"_id":"59d17bcfb52d110024a758f5","project":"568bdc1483d2061900d86cdc","version":{"_id":"59a72290d61777001b6c42c3","project":"568bdc1483d2061900d86cdc","__v":19,"createdAt":"2017-08-30T20:39:44.453Z","releaseDate":"2017-08-30T20:39:44.453Z","categories":["59a7236e3fe4d90025117c10","59a72eb6cb0db3001b84cfe2","59a734eb757d030019b85af8","59c0243b1b2d07001a9d2b76","59c035e42126e10028effb12","59c06c40df5b3c0010584a13","59c1a5852cabe5002641a3e7","59c2fb00b2b45c0010b7a3d7","59c32ceb9aea850010ac4130","59c32e6e190c90003cb0d12f","59c33affb2b45c0010b7aa23","59c7dfa457bd8200105444dc","59c7e975c50cf30010d712a0","59cffdef0cd4dd0010294d54","59d0622ca91a810032c8f60c","59d06733c1aec60026253065","59d174d44ac471001a07b123","59d5a5e323e6e800103defb2","59ecf1d8ed507c001c52b255"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"0.0.0","version":"0"},"category":{"_id":"59a72eb6cb0db3001b84cfe2","project":"568bdc1483d2061900d86cdc","version":"59a72290d61777001b6c42c3","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2017-08-30T21:31:34.201Z","from_sync":false,"order":0,"slug":"knowledge-base","title":"Getting Started"},"user":"58cc41f21751ce2f003be3b7","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-10-01T23:35:43.044Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":5,"body":"# Overview\n\nThe Droplit command line console can be used to access most of the Droplit system's functionality through the system command line. The console syntax differs from that of the REST API, but still uses the same terminology.\n\n![box](https://app.box.com/shared/static/cbkt8zzc0ktla8j3244blcew1pasz4l7.png)\n\nThe dropit.io CLI has been designed to be somewhat self-documenting. Running a command will output any nested commands, command parameters, descriptions, and options.\n\n![box](https://app.box.com/shared/static/51zfq0gxnh33z7cdrbho2s99tfzf4r8n.png)\n\nTo see a full list of top-level commands, run `droplit` on the command line.\n\n![box](https://app.box.com/shared/static/2kl1v4f9gqdfi638v3eh3j1c4yjn67uv.png)\n\nA full Droplit console reference will be coming soon.\n\n# Logging In\n\nBefore using the CLI, login with valid Droplit.io developer account credentials from the [droplit.io portal](https://portal.droplit.io) by running the following command.\n\n```\ndroplit account authenticate\n```\n\n![box](https://app.box.com/shared/static/tmjyyz850s78q5m3tisj467z9n8gz0xf.png)\n\n# Developer mode\n\nUse developer mode to enable developer commands and advanced features.\n\n```\ndroplit settings develop true\n```\n\n![box](https://app.box.com/shared/static/bcxsk30fkii1fbwcgrc4h2m91l3b6v31.png)\n\nRunning `droplit` now shows more commands.\n\n![box](https://app.box.com/shared/static/7nistscfxw1p6z1806m95tvskktxrfzo.png)\n\n# Debug Mode\n\nDebug mode is a feature that enables diagnostic output when running commands. This lets yusers see all contents of HTTP requests and responses made to and from the droplit.io API.\n\n![box](https://app.box.com/shared/static/mmed18v01mva96c6ta3jhylyij2e8pn1.png)\n\nEnable debug mode by running the following command.\n\n```\ndroplit settings debug true\n```\n\n![box](https://app.box.com/shared/static/x59alkgpvik3ffzzzy4fltc2xnu7vm2a.png)\n\n# Selection\n\nThe Droplit.io CLI stores any item the user explicitly selects to browse sub-items in subsequent requests. Either ecosystems or environments can be selected in this way. After selecting an object, it is no longer necessary to explicitly reference that object in console commands.\n\nSelect an ecosystem by its ID:\n\n```\ndroplit ecosystem select <ecosystemId>\n```\n\n![box](https://app.box.com/shared/static/yyvhcnq5c3g5rdtztdqz67x6mxjabopp.png)\n\nList all environments in the currently selected ecosystem:\n\n```\ndroplit environment list\n```\n\n![box](https://app.box.com/shared/static/2z1fotf5fj5vo9kryxau7532o3nu0a2v.png)\n\nAlternatively, an ecosystem can be referenced in a command using the &ldquo;--ecosystemId&rdquo; flag, and an environment can be referenced using the &ldquo;--environmentId&rdquo; flag. These flags take precedence over any object currently selected.\n\n```\ndroplit list environment <environmentID> --ecosystemID <ecosystemID>\n```\n\n## Aliasing\n\nTo create an alias for an object, use the &ldquo;alias&rdquo; command.\n\n```\ndroplit device alias <deviceId> <alias>\n``` \n\n![box](https://app.box.com/shared/static/w1kbh3c4uy53p3x4eqwrw1agjmxegwd9.png)","excerpt":"","slug":"command-line-tools","type":"basic","title":"Droplit Command Line Console"}

Droplit Command Line Console


# Overview The Droplit command line console can be used to access most of the Droplit system's functionality through the system command line. The console syntax differs from that of the REST API, but still uses the same terminology. ![box](https://app.box.com/shared/static/cbkt8zzc0ktla8j3244blcew1pasz4l7.png) The dropit.io CLI has been designed to be somewhat self-documenting. Running a command will output any nested commands, command parameters, descriptions, and options. ![box](https://app.box.com/shared/static/51zfq0gxnh33z7cdrbho2s99tfzf4r8n.png) To see a full list of top-level commands, run `droplit` on the command line. ![box](https://app.box.com/shared/static/2kl1v4f9gqdfi638v3eh3j1c4yjn67uv.png) A full Droplit console reference will be coming soon. # Logging In Before using the CLI, login with valid Droplit.io developer account credentials from the [droplit.io portal](https://portal.droplit.io) by running the following command. ``` droplit account authenticate ``` ![box](https://app.box.com/shared/static/tmjyyz850s78q5m3tisj467z9n8gz0xf.png) # Developer mode Use developer mode to enable developer commands and advanced features. ``` droplit settings develop true ``` ![box](https://app.box.com/shared/static/bcxsk30fkii1fbwcgrc4h2m91l3b6v31.png) Running `droplit` now shows more commands. ![box](https://app.box.com/shared/static/7nistscfxw1p6z1806m95tvskktxrfzo.png) # Debug Mode Debug mode is a feature that enables diagnostic output when running commands. This lets yusers see all contents of HTTP requests and responses made to and from the droplit.io API. ![box](https://app.box.com/shared/static/mmed18v01mva96c6ta3jhylyij2e8pn1.png) Enable debug mode by running the following command. ``` droplit settings debug true ``` ![box](https://app.box.com/shared/static/x59alkgpvik3ffzzzy4fltc2xnu7vm2a.png) # Selection The Droplit.io CLI stores any item the user explicitly selects to browse sub-items in subsequent requests. Either ecosystems or environments can be selected in this way. After selecting an object, it is no longer necessary to explicitly reference that object in console commands. Select an ecosystem by its ID: ``` droplit ecosystem select <ecosystemId> ``` ![box](https://app.box.com/shared/static/yyvhcnq5c3g5rdtztdqz67x6mxjabopp.png) List all environments in the currently selected ecosystem: ``` droplit environment list ``` ![box](https://app.box.com/shared/static/2z1fotf5fj5vo9kryxau7532o3nu0a2v.png) Alternatively, an ecosystem can be referenced in a command using the &ldquo;--ecosystemId&rdquo; flag, and an environment can be referenced using the &ldquo;--environmentId&rdquo; flag. These flags take precedence over any object currently selected. ``` droplit list environment <environmentID> --ecosystemID <ecosystemID> ``` ## Aliasing To create an alias for an object, use the &ldquo;alias&rdquo; command. ``` droplit device alias <deviceId> <alias> ``` ![box](https://app.box.com/shared/static/w1kbh3c4uy53p3x4eqwrw1agjmxegwd9.png)