https://github.com/denysvitali/go-designer
A CLI and Go package to interact with Microsoft Designer to generate images.
https://github.com/denysvitali/go-designer
artificial-intelligence dalle-2 generative-ai generative-art microsoft-designer
Last synced: 4 months ago
JSON representation
A CLI and Go package to interact with Microsoft Designer to generate images.
- Host: GitHub
- URL: https://github.com/denysvitali/go-designer
- Owner: denysvitali
- License: other
- Created: 2023-05-14T08:32:27.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-05-14T08:55:36.000Z (over 2 years ago)
- Last Synced: 2025-07-26T13:25:07.561Z (4 months ago)
- Topics: artificial-intelligence, dalle-2, generative-ai, generative-art, microsoft-designer
- Language: Go
- Homepage:
- Size: 59.6 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# go-designer
A CLI and Go package to interact with
[Microsoft Designer](https://designer.microsoft.com/) to generate images.
## Example
```bash
designer-cli "Flat vector illustration of a developer using a terminal"
```
Returns (after a few seconds):
```plain
INFO[0016] written 5031222530fccaa508c0a481694ae80f-0.jpg
INFO[0016] written 5031222530fccaa508c0a481694ae80f-1.jpg
INFO[0016] written 5031222530fccaa508c0a481694ae80f-2.jpg
```
The result `output/5031222530fccaa508c0a481694ae80f-0.jpg` should return something like this:

## Installing
### Requirements
- Go 1.20+
### Steps
```bash
go install github.com/denysvitali/go-designer/cmd/designer-cli
designer-cli -h
```
### Getting the token
1. Visit https://designer.microsoft.com/
2. Retrieve the token (two options)
1. Open the Developer Tools and check the response for the request to:
`https://login.microsoftonline.com/consumers/oauth2/v2.0/token`
Copy the value of `access_token` in your clipboard and keep it for later
2. Generate an image and get the token from the `Authorization: Bearer TOKEN` header
3. Store the token in the `DESIGNER_TOKEN` environment variable as follows:
```bash
read -s -r DESIGNER_TOKEN
# Paste your token and press ENTER
export DESIGNER_TOKEN
```
### Using the CLI
Pretty straight-forward:
```
designer-cli "Your prompt goes here"
```
### Prompt suggestions
#### Generating Flat Vector Images
```plain
Flat vector illustration of ...
```
Example result:
