Coder Social home page Coder Social logo

ykankaya / contentful-cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from contentful/contentful-cli

0.0 1.0 0.0 751 KB

The official Contentful command line interface. Use Contentful features straight from the command line!

Home Page: https://www.contentful.com

License: MIT License

JavaScript 99.73% Shell 0.24% HTML 0.03%

contentful-cli's Introduction

Contentful CLI

Contentful's command line interface tool. Use Contentful features straight from your CLI.

npm Build Status codecov

Contentful provides a content infrastructure for digital teams to power content in websites, apps, and devices. Unlike a CMS, Contentful was built to integrate with the modern software stack. It offers a central hub for structured content, powerful management and delivery APIs, and a customizable web app that enable developers and content creators to ship digital products faster.

๐Ÿš€ Features

  • Securely login and logout with our OAuth service.
  • Manage spaces - List, create, ...
  • Export your space to a JSON file.
  • Import your space from a JSON file.
  • Execute migration scripts written in the Contentful Migration DSL
  • Seed your space with example data.
  • Manage installation of extensions in a space.
  • Run a guide which introduces you to the Contentful basics.
  • Find all available commands in the docs section.
  • More to come soon! ๐Ÿš€

โ˜๏ธ Installation

Using npm:

npm install -g contentful-cli

Using yarn:

yarn global add contentful-cli

Please note that for the non standalone versions you need node => v6 to use the CLI.

โœ‹ Usage

Use the --help parameter to display the help section for CLI tool or combined with a specific command to get the help section for that command.

contentful --help
# or
contentful space --help

Enable bash-completion

To enable bash-completion for available commands use the completion command and concat the generated script to your .bashrc or .bash_profile.

contentful completion

Using the CLI tool with a proxy

You can save the proxy configuration in your .contentfulrc.json via:

contentful config add --proxy user:auth@host:port

We also respect the http(s)_proxy environment variables:

https_proxy=user:auth@host:port contentful

When multiple proxy configurations exists, precedence is taken in this form:

  1. http_proxy takes precedence over .contentfulrc.json
  2. https_proxy takes precedence over .contentfulrc.json
  3. https_proxy takes precedence over http_proxy

๐Ÿ“š Documentation

More detailed documentation for every command can be found in the docs section.

๐Ÿ› ๏ธ Development

After installing the dependencies, there is a trick to get your version of the CLI tool available globally on your system:

npm link

This may collide with your already globally installed Contentful CLI. Make sure to remove that one first.

๐Ÿค– Testing

End-To-End Functional Tests

โš ๏ธ Environment variables should be set:

CLI_E2E_CMA_TOKEN = <cma_auth_token>
CLI_E2E_ORG_ID = <organization_id>

npm:

npm run test:e2e

or using AVA:

$ ava test/integration/** --verbose --serial

โš ๏ธ Since the e2e tests are running in serial mode currently, you should be logged out or rm ~/.contentfulrc.json

โ“ Support

If you have a problem with this tool, please file an issue here on Github.

If you have other problems with Contentful not related to this library, you can contact Customer Support.

โœ๏ธ Contributing

See CONTRIBUTING.md

๐Ÿ“œ License

MIT

contentful-cli's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.