Giter Site home page Giter Site logo

yuta519 / defang Goto Github PK

View Code? Open in Web Editor NEW

This project forked from defanglabs/defang

0.0 0.0 0.0 1.24 MB

Defang CLI and sample projects

Home Page: https://defang.io

License: MIT License

Shell 3.47% Go 94.90% Nix 1.07% Makefile 0.51% Dockerfile 0.04%

defang's Introduction

Go package

Defang

Defang is a radically simpler way for developers to create, deploy, and manage cloud applications.

This repo includes:

  • Public releases of the Defang CLI; click here for the latest version
  • Samples in Golang, Python, and Node.js that show how to accomplish various tasks and deploy them to the DOP using a Docker Compose file using the Defang CLI.
  • Samples that show how to deploy an app using the Defang Pulumi Provider.

Getting started

  • Read our Getting Started page
  • Follow the installation instructions from the Installing page
  • Take a look at our Samples folder for example projects in various programming languages.
  • Try the AI integration by running defang generate
  • Start your new service with defang compose up

Installing

Install the Defang CLI from one of the following sources:

  • Using the Homebrew package manager defang-io/defang tap:
    brew install defang-io/defang/defang
    
  • Using a shell script:
    . <(curl -s https://raw.githubusercontent.com/defang-io/defang/main/src/bin/install.sh)
    
  • Using Go:
    go install github.com/defang-io/defang/src/cmd/cli@latest
    
  • Using the Nix package manager:
    • with Nix-Env:
      nix-env -if https://github.com/defang-io/defang/archive/main.tar.gz
      
    • or with Flakes:
      nix profile install github:defang-io/defang#defang-bin --refresh
      
  • Download the latest binary of the Defang CLI. For this beta, MacOS users will have to explicitly allow running of downloaded programs in the OS security settings.

Support

Command completion

The Defang CLI supports command completion for Bash, Zsh, Fish, and Powershell. To get the shell script for command completion, run the following command:

defang completion [bash|zsh|fish|powershell]

If you're using Bash, you can add the following to your ~/.bashrc file:

source <(defang completion bash)

If you're using Zsh, you can add the following to your ~/.zshrc file:

source <(defang completion zsh)

or pipe the output to a file called _defang in the directory with the completions.

If you're using Fish, you can add the following to your ~/.config/fish/config.fish file:

defang completion fish | source

If you're using Powershell, you can add the following to your $HOME\Documents\PowerShell\Microsoft.PowerShell_profile.ps1 file:

Invoke-Expression -Command (defang completion powershell | Out-String)

Environment Variables

The Defang CLI recognizes the following environment variables:

  • COMPOSE_PROJECT_NAME - The name of the project to use; overrides the name in the compose.yaml file
  • DEFANG_ACCESS_TOKEN - The access token to use for authentication; if not specified, uses token from defang login
  • DEFANG_CD_IMAGE - The image to use for the Continuous Deployment (CD) pipeline; defaults to public.ecr.aws/defang-io/cd:public-beta
  • DEFANG_DEBUG - set this to 1 or true to enable debug logging
  • DEFANG_DISABLE_ANALYTICS - If set to true, disables sending analytics to Defang; defaults to false
  • DEFANG_FABRIC - The address of the Defang Fabric to use; defaults to fabric-prod1.defang.dev
  • DEFANG_HIDE_HINTS - If set to true, hides hints in the CLI output; defaults to false
  • DEFANG_HIDE_UPDATE - If set to true, hides the update notification; defaults to false
  • DEFANG_PROVIDER - The name of the cloud provider to use, auto (default), aws, or defang
  • NO_COLOR - If set to any value, disables color output; by default, color output is enabled depending on the terminal
  • XDG_STATE_HOME - The directory to use for storing state; defaults to ~/.local/state

defang's People

Contributors

lionello avatar raphaeltm avatar edw-defang avatar goreleaserbot avatar dependabot[bot] avatar edwardrf avatar acote88 avatar prakash-sundaresan 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.