GithubHelp home page GithubHelp logo

netlifyctl's Introduction

Build Status

Introduction

Netlify's CLI to manage and deploy sites on Netlify without leaving your terminal.

It uses the OpenAPI definitions to interact with Netlify's API.

Installation

Binary Distribution

GitHub Releases

Prebuilt binaries are available for Windows, OS X and Linux.

Homebrew

brew tap netlify/netlifyctl
brew install netlifyctl

Source

netlifyctl can be installed from source:

$ go get github.com/netlify/netlifyctl

Usage

Overview

netlifyctl --help

or to get details on a subcommand:

netlifyctl site update --help

Quickstart

  1. Use netlifyctl login to create an API token for your personal use. This command requires you to have access to a browser. Your access token will be stored in %HOME%/.config/netlify when you run the command directly.

  2. Use netlifyctl sites to display the list of sites you have access to.

  3. Use netlifyctl deploy to deploy changes on a site. This command must run from the root directory where you have your site's source code. The interactive guides will take your site ID and deploy path and incorporate them into that config file.

Thereafter, you can run unattended and headless using the flag -y to auto confirm the current settings: netlifyctl -y deploy.

Debugging

Netlifyctl generates debug logs with all the request and response interations when there is an error running any command. Those logs are stored in a file called netlifyctl-debug.log in the directory where you ran the command. These logs include your access token for the API, make sure you don't share them with anyone without masking those first.

You can force the CLI to generate these logs even when there are no errors with the -D flag: netlifyctl -D deploy.

Logging in & creating authentication tokens via a browser instead of the command line

You can get an access token from https://app.netlify.com/applications. Once you've created it, you can store it in your computer. The default location where netlifyctl tries to find this token is within your home directory, inside a file called netlify within a directory called .config. The path in a Unix system looks like ~/.config/netlify. This file uses JSON formatting, you can see an example below:

{
  "access_token": "my secret access token"
}

You can also set this token with the flag -A in each command call if you don't want to store it in a file: netlifyctl -A "my secret access token" deploy.

Contributions and Bug Reports

Contributions are welcome via Pull Request.

Bug Reports are welcome as Issues filed on this repository, but feel free to chat with [email protected] about issues too!

License

MIT

netlifyctl's People

Contributors

bdougie avatar biilmann avatar brycekahle avatar calavera avatar dvrkps avatar erans avatar fool avatar rybit avatar

Watchers

 avatar  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.