From acd34436f96e5d0981225bbe33deadad01ee4db4 Mon Sep 17 00:00:00 2001 From: Gabriel Ratcliff Date: Thu, 4 Jul 2019 16:26:11 -0700 Subject: [PATCH] readme WIP --- README.md | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 50 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 145caba99..e865ae920 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,24 @@ -# `rdme` - ReadMe's API CLI - -This is a CLI wrapper around [ReadMe's HTTP API](https://readme.readme.io/v2.0/reference). +# `rdme` - ReadMe's CLI [![CircleCI](https://circleci.com/gh/readmeio/rdme.svg?style=svg)](https://circleci.com/gh/readmeio/rdme) [![](https://d3vv6lp55qjaqc.cloudfront.net/items/1M3C3j0I0s0j3T362344/Untitled-2.png)](https://readme.io) +### Table of Contents + * [What is rdme?](#what-is-veneur) + * [Configuration](#installation) + * [Installation](#installation) + * [Login](#logging-in-to-a-readme-project) + * [Usage](#usage) + * [Swagger](#swagger) + * [Docs](#docs) + * [Versions](#versions) + * [Opening A Project Spec](#open) + * [Future](#future) + +### About `rdme` +`rdme` is the command line interface wrapper for [ReadMe's RESTful API](https://readme.readme.io/v2.0/reference). It allows you to upload and edit [Swagger](https://swagger.io/) and [OAS](https://swagger.io/specification/) files associated with projects you create on [Readme.io](https://readme.com/). Additionally, you can sync documentation with your project, and manage project versions. + ## Installation ```sh npm install rdme @@ -32,6 +45,19 @@ rdme swagger {path-to-swagger.json} --key={api-key} rdme swagger {path-to-swagger.json} --key={api-key} --id={existing-id} ``` +#### Uploading or editing a swagger file including with specified version +You can additional include a version flag, specifying the target version for your file's destination: +```sh +rdme swagger {path-to-swagger.json} --key={api-key} --version={project-version} +``` + +#### Omitting the file path +If you run `rdme` within a directory that contains your Swagger or OAS file, you can omit the file path. +Be sure to use one of the following file names: 'swagger.json', 'swagger.yaml', 'openapi.json', 'openapi.yaml' +```sh +rdme swagger --key={api-key} +``` + ### Syncing a folder of markdown docs to ReadMe ```sh @@ -44,6 +70,27 @@ rdme docs path-to-markdown-files --key={api-key} --version={project-version} rdme docs:edit --key={api-key} --version={project-version} ``` +### Get all versions associated with your project +```sh +rdme versions --key={api-key} +``` + +### Get all information about a particular version +```sh +rdme versions:versionId --key={api-key} --version={project-version} +``` + +### Create a new version using flags +```sh +rdme versions:create --key={api-key} --version={project-version} --fork={version-fork} --codename={version-name} --main --beta +``` + +### Create a new version without flags +Creating a version without version-specific flags will allow the ReadMe CLI to prompt you with configuration options +```sh +rdme versions:create --key={api-key} --version={project-version} +``` + ### Open your ReadMe project in your browser If you are logged in, this will open the project in your browser: