From 09c5699cdff546ee7bbd3f786ca84476a916843a Mon Sep 17 00:00:00 2001 From: Stephen Mizell Date: Tue, 4 Nov 2014 10:55:01 -0600 Subject: [PATCH 1/2] Add Apiary CLI post --- ...eract-with-Apiary-from-the-Command-Line.md | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 _posts/2014-11-05-Interact-with-Apiary-from-the-Command-Line.md diff --git a/_posts/2014-11-05-Interact-with-Apiary-from-the-Command-Line.md b/_posts/2014-11-05-Interact-with-Apiary-from-the-Command-Line.md new file mode 100644 index 0000000..66d08d5 --- /dev/null +++ b/_posts/2014-11-05-Interact-with-Apiary-from-the-Command-Line.md @@ -0,0 +1,48 @@ +--- +title: Interact with Apiary from the Command Line +excerpt: Use our CLI tool to preview, fetch, and publish your API Blueprints +layout: post +date: 2014-11-05 00:00:00 -0600 +author: stephen +published: true +comments: true +--- + +We thought we'd put together a blog post to highlight another way for you to work work with Apiary, and that is through using our [Apiary CLI tool](http://client.apiary.io/). Everyone has their own workflow, and sometimes that workflow involves their favorite editor and the command line. This Apiary CLI tool can allow you to stay in that workflow while interacting directly with Apiary through our [API](http://docs.apiary.apiary.io/). + +## Previewing Locally + +With the Apiary CLI tool, you can [preview](http://client.apiary.io/#preview) what your API Blueprint would look like on Apiary while working in your favorite editor. + +~~~shell +apiary preview --server +~~~ + +By default, this is going to be looking for a file in the current directory for an API Blueprint named `apiary.apib`, which can be changed. Every refresh of the page will send your API Blueprint to Apiary to be rendered and sent back to you. + +This is great for allowing Apiary to be part of your current workflow without requiring you to use our editor, and since you see exactly what we generate, you know your changes will be right when you publish them. + +## Fetching from Apiary + +To make this work even better with your workflow, you can also [fetch](http://client.apiary.io/#fetch) and [publish](http://client.apiary.io/#publish) your API Blueprints. If you have existing documenation at Apiary, you can easily grab that document for developing and previewing locally. + +~~~shell +apiary fetch --api-name=API_NAME +~~~ + +This command grabs the published documentation and saves it as `apiary.apib`. + +## Publishing to Apiary + +Once you've made your changes and previewed how they look locally, you can publish those changes directly to Apiary with another simple command. + +~~~shell +apiary publish --api-name=API_NAME +~~~ + +No need to copy and paste to Apiary–just publish your changes and keep working. + +## Conclusion + +The goal with this is to make your life easier by providing tools that can fit directly into your workflow. The Apiary CLI tool is [open source](https://github.com/apiaryio/apiary-client), and we are always interested in pull requests. Additionally, if you have any thoughts on ways to make this tool even better, please let us know! + From c587190f7aafa113a9bcc8033485b6868e77032f Mon Sep 17 00:00:00 2001 From: Stephen Mizell Date: Tue, 4 Nov 2014 21:31:30 -0600 Subject: [PATCH 2/2] Fix typos --- .../2014-11-05-Interact-with-Apiary-from-the-Command-Line.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_posts/2014-11-05-Interact-with-Apiary-from-the-Command-Line.md b/_posts/2014-11-05-Interact-with-Apiary-from-the-Command-Line.md index 66d08d5..90c41ea 100644 --- a/_posts/2014-11-05-Interact-with-Apiary-from-the-Command-Line.md +++ b/_posts/2014-11-05-Interact-with-Apiary-from-the-Command-Line.md @@ -8,7 +8,7 @@ published: true comments: true --- -We thought we'd put together a blog post to highlight another way for you to work work with Apiary, and that is through using our [Apiary CLI tool](http://client.apiary.io/). Everyone has their own workflow, and sometimes that workflow involves their favorite editor and the command line. This Apiary CLI tool can allow you to stay in that workflow while interacting directly with Apiary through our [API](http://docs.apiary.apiary.io/). +We thought we'd put together a blog post to highlight another way for you to work with Apiary, and that is through using our [Apiary CLI tool](http://client.apiary.io/). Everyone has their own workflow, and sometimes that workflow involves their favorite editor and the command line. This Apiary CLI tool can allow you to stay in that workflow while interacting directly with Apiary through our [API](http://docs.apiary.apiary.io/). ## Previewing Locally @@ -24,7 +24,7 @@ This is great for allowing Apiary to be part of your current workflow without re ## Fetching from Apiary -To make this work even better with your workflow, you can also [fetch](http://client.apiary.io/#fetch) and [publish](http://client.apiary.io/#publish) your API Blueprints. If you have existing documenation at Apiary, you can easily grab that document for developing and previewing locally. +To make this work even better with your workflow, you can also [fetch](http://client.apiary.io/#fetch) and [publish](http://client.apiary.io/#publish) your API Blueprints. If you have existing documentation at Apiary, you can easily grab that document for developing and previewing locally. ~~~shell apiary fetch --api-name=API_NAME