|
1 |
| -## Build |
2 |
| -``` |
3 |
| -go mod download |
4 |
| -make |
5 |
| -``` |
6 |
| - |
7 |
| -## Run |
8 |
| -``` |
9 |
| -./defang |
10 |
| -``` |
11 |
| - |
12 |
| -## Format Code |
13 |
| -``` |
14 |
| -go fmt |
15 |
| -``` |
16 |
| - |
17 |
| -## Update Dependencies |
18 |
| -To regenerate the `go.mod` file: |
19 |
| -``` |
20 |
| -go mod tidy |
21 |
| -``` |
22 |
| - |
23 |
| -## Release |
24 |
| -To release a new version, run: |
25 |
| -``` |
26 |
| -make release |
27 |
| -``` |
28 |
| -This will create a new tag (incrementing the patch number) and push it to the |
29 |
| -repository, triggering a new build on the CI/CD pipeline. |
| 1 | +## Develop Once. Deploy Anywhere. |
| 2 | +Take your app from Docker Compose to a secure and scalable deployment on your favorite cloud in minutes. |
| 3 | + |
| 4 | +## Defang CLI |
| 5 | +The Defang Command-Line Interface [(CLI)](https://docs.defang.io/docs/getting-started) is designed for developers who prefer to manage their workflows directly from the terminal. It offers full access to Defang’s capabilities, allowing you to build, test, and deploy applications efficiently to the cloud. |
| 6 | + |
| 7 | +## Getting started |
| 8 | + |
| 9 | +- Read our [Getting Started](https://docs.defang.io/docs/getting-started) page |
| 10 | +- Follow the installation instructions from the [Installing](https://docs.defang.io/docs/getting-started/installing) page |
| 11 | +- Take a look at our [Samples folder](https://github.com/DefangLabs/defang/tree/main/samples) for example projects in various programming languages. |
| 12 | +- Try the AI integration by running `defang generate` |
| 13 | +- Start your new service with `defang compose up` |
| 14 | + |
| 15 | +## Support |
| 16 | + |
| 17 | +- File any issues [here](https://github.com/DefangLabs/defang/issues) |
| 18 | + |
| 19 | +## Environment Variables |
| 20 | + |
| 21 | +The Defang CLI recognizes the following environment variables: |
| 22 | + |
| 23 | +- `COMPOSE_PROJECT_NAME` - The name of the project to use; overrides the name in the `compose.yaml` file |
| 24 | +- `DEFANG_ACCESS_TOKEN` - The access token to use for authentication; if not specified, uses token from `defang login` |
| 25 | +- `DEFANG_BUILD_CONTEXT_LIMIT` - The maximum size of the build context when building container images; defaults to `100MiB` |
| 26 | +- `DEFANG_CD_BUCKET` - The S3 bucket to use for the BYOC CD pipeline; defaults to `defang-cd-bucket-…` |
| 27 | +- `DEFANG_CD_IMAGE` - The image to use for the Continuous Deployment (CD) pipeline; defaults to `public.ecr.aws/defang-io/cd:public-beta` |
| 28 | +- `DEFANG_DEBUG` - set this to `1` or `true` to enable debug logging |
| 29 | +- `DEFANG_DISABLE_ANALYTICS` - If set to `true`, disables sending analytics to Defang; defaults to `false` |
| 30 | +- `DEFANG_EDITOR` - The editor to launch after new project generation; defaults to `code` (VS Code) |
| 31 | +- `DEFANG_FABRIC` - The address of the Defang Fabric to use; defaults to `fabric-prod1.defang.dev` |
| 32 | +- `DEFANG_JSON` - If set to `true`, outputs JSON instead of human-readable output; defaults to `false` |
| 33 | +- `DEFANG_HIDE_HINTS` - If set to `true`, hides hints in the CLI output; defaults to `false` |
| 34 | +- `DEFANG_HIDE_UPDATE` - If set to `true`, hides the update notification; defaults to `false` |
| 35 | +- `DEFANG_ISSUER` - The OAuth2 issuer to use for authentication; defaults to `https://auth.defang.io` |
| 36 | +- `DEFANG_MODEL_ID` - The model ID of the LLM to use for the generate/debug AI integration (Pro users only) |
| 37 | +- `DEFANG_NO_CACHE` - If set to `true`, disables pull-through caching of container images; defaults to `false` |
| 38 | +- `DEFANG_ORG` - The name of the organization to use; defaults to the user's GitHub name |
| 39 | +- `DEFANG_PREFIX` - The prefix to use for all BYOC resources; defaults to `Defang` |
| 40 | +- `DEFANG_PROVIDER` - The name of the cloud provider to use, `auto` (default), `aws`, `digitalocean`, `gcp`, or `defang` |
| 41 | +- `DEFANG_PULUMI_BACKEND` - The Pulumi backend URL or `"pulumi-cloud"`; defaults to a self-hosted backend |
| 42 | +- `DEFANG_PULUMI_DIR` - Run Pulumi from this folder, instead of spawning a cloud task; requires `--debug` (BYOC only) |
| 43 | +- `DEFANG_PULUMI_VERSION` - Override the version of the Pulumi image to use (`aws` provider only) |
| 44 | +- `NO_COLOR` - If set to any value, disables color output; by default, color output is enabled depending on the terminal |
| 45 | +- `PULUMI_ACCESS_TOKEN` - The Pulumi access token to use for authentication to Pulumi Cloud; see `DEFANG_PULUMI_BACKEND` |
| 46 | +- `PULUMI_CONFIG_PASSPHRASE` - Passphrase used to generate a unique key for your stack, and configuration and encrypted state values |
| 47 | +- `TZ` - The timezone to use for log timestamps: an IANA TZ name like `UTC` or `Europe/Amsterdam`; defaults to `Local` |
| 48 | +- `XDG_STATE_HOME` - The directory to use for storing state; defaults to `~/.local/state` |
| 49 | + |
0 commit comments