{"id":17686312,"url":"https://github.com/shihanng/devto","last_synced_at":"2025-05-13T00:08:06.970Z","repository":{"id":57529921,"uuid":"228180176","full_name":"shihanng/devto","owner":"shihanng","description":"CLI tool to publish article to https://dev.to/","archived":false,"fork":false,"pushed_at":"2020-09-17T23:13:18.000Z","size":209,"stargazers_count":13,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-05-13T00:07:56.929Z","etag":null,"topics":["cli","devto","go","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shihanng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-15T12:26:35.000Z","updated_at":"2025-02-17T18:59:09.000Z","dependencies_parsed_at":"2022-09-26T18:11:21.201Z","dependency_job_id":null,"html_url":"https://github.com/shihanng/devto","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shihanng%2Fdevto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shihanng%2Fdevto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shihanng%2Fdevto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shihanng%2Fdevto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shihanng","download_url":"https://codeload.github.com/shihanng/devto/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253843215,"owners_count":21972873,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","devto","go","golang"],"created_at":"2024-10-24T10:44:30.738Z","updated_at":"2025-05-13T00:08:06.936Z","avatar_url":"https://github.com/shihanng.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# devto -- publish to [dev.to](https://dev.to) from your terminal\n\n[![CI](https://github.com/shihanng/devto/workflows/main/badge.svg?branch=develop)](https://github.com/shihanng/devto/actions?query=workflow%3Amain)\n[![Release](https://github.com/shihanng/devto/workflows/release/badge.svg)](https://github.com/shihanng/devto/actions?query=workflow%3Arelease)\n[![GitHub release (latest by date)](https://img.shields.io/github/v/release/shihanng/devto)](https://github.com/shihanng/devto/releases)\n[![Coverage Status](https://coveralls.io/repos/github/shihanng/devto/badge.svg?branch=develop)](https://coveralls.io/github/shihanng/devto?branch=develop)\n[![Go Report Card](https://goreportcard.com/badge/github.com/shihanng/devto)](https://goreportcard.com/report/github.com/shihanng/devto)\n[![GitHub](https://img.shields.io/github/license/shihanng/devto)](./LICENSE)\n\n## What is this?\n\n`devto` is a CLI tool that helps submit articles to DEV from the terminal. It makes use of the [APIs that DEV kindly provides in OpenAPI specification](https://docs.dev.to/api/). `devto` mainly does two things:\n\n1. It collects all image links from the Markdown file into a `devto.yml` file with the `generate` subcommand. For example, if we have `./image-1.png` and `./image-2.png` in the Markdown file, we will get the following:\n\n   ```yml\n   images:\n     ./image-1.png: \"\"\n     ./image-2.png: \"\"\n   ```\n\n2. It submits the article to DEV with the `submit` subcommand. The `submit` subcommand creates a new article in DEV and updates the `devto.yml` with the resulting `article_id`. `devto` will use this `article_id` in the following execution to perform an update operation instead of creating a new entry for the same article.\n\nThe DEV API does not have a way of uploading images yet. If we submit a Markdown content with relative paths of image links, DEV will not be able to show those images. As a workaround of this problem, we need to provide a full path for the images either manually via the `devto.yml` file or using the `--prefix` flag.\n\nThe Markdown file must contains at least the title property of the Jekyll front matter, like in:\n\n```\n---\ntitle: An example title\ndescription: ...\ntags: ...\ncover_image: ...\n---\n```\n\nYou can find more information about the usage via the `--help` flag.\n\n```sh\ndevto --help\n```\n\n## Installation\n\n### [Homebrew (macOS)](https://github.com/shihanng/homebrew-devto)\n\n```sh\nbrew install shihanng/devto/devto\n```\n\n### Debian, Ubuntu\n\n```sh\ncurl -sLO https://github.com/shihanng/devto/releases/latest/download/devto_linux_amd64.deb\ndpkg -i devto_linux_amd64.deb\n```\n\n### RedHat, CentOS\n\n```sh\nrpm -ivh https://github.com/shihanng/devto/releases/latest/download/devto_linux_amd64.rpm\n```\n\n### Binaries\n\nThe [release page](https://github.com/shihanng/devto/releases) contains binaries built for various platforms. Download the version matches your environment (e.g. `linux_amd64`) and place the binary in the executable `$PATH` e.g. `/usr/local/bin`:\n\n```sh\ncurl -sL https://github.com/shihanng/devto/releases/latest/download/devto_linux_amd64.tar.gz | \\\n    tar xz -C /usr/local/bin/ devto\n```\n\n### For Gophers\n\nWith [Go](https://golang.org/doc/install) already installed in your system, use `go get`\n\n```sh\ngo get github.com/shihanng/devto\n```\n\nor clone this repo and `make install`\n\n```sh\ngit clone https://github.com/shihanng/devto.git\ncd devto\nmake install\n```\n\n## Configuration\n\n| Description                                                                                    | CLI Flag    | Environment Variable | `config.yml` |\n| ---------------------------------------------------------------------------------------------- | ----------- | -------------------- | ------------ |\n| [DEV API key](https://docs.dev.to/api/#section/Authentication) is needed to talk with DEV API. | `--api-key` | `DEVTO_API_KEY`      | `api-key`    |\n\n### Sample config in YAML\n\n```yaml\napi-key: abcd1234\n```\n\n## Contributing\n\nWant to add missing feature? Found bug :bug:? Pull requests and issues are welcome. For major changes, please open an issue first to discuss what you would like to change :heart:.\n\n```sh\nmake lint\nmake test\n```\n\nshould help with the idiomatic Go styles and unit-tests.\n\n### How to generate [DEV's API](https://docs.dev.to/api/) client\n\n```sh\nmake gen\n```\n\nSee [`pkg/devto`](./pkg/devto) for client documentation.\n\n## License\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshihanng%2Fdevto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshihanng%2Fdevto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshihanng%2Fdevto/lists"}