Skip to main content

A CLI interface for dev.to

Please note before using that you should put your API key in the DEV_API_KEY environment variable. If you prefer, when starting the program will also look for a .env file in the working directory.

You can get this tool simply by doing a:

pip install dev-cli

Publishing

You can publish a Markdown file directly to dev.to using DEV-CLI. Your Markdown file must be identical to what you would input directly in the website’s interface.

Something else that you should take in account is the key. Indeed, when an article is created the API ID isn’t retrofitted to the Markdown file since this would get a little bit messy. Instead, you have several options to map your local files to your remote articles.

Namely you can use the cover_picture, the canonical_url or the title from the front matter. Please note that whatever you chose it must be set in the front matter, otherwise the program will fail. The default key is canonical_url, because it won’t appear in your source file unless you know what you’re doing.

Please note that you don’t have to use the same key every time. Suppose that you use the title but want to change it, you can do one sync with cover_picture instead of title as long as you don’t change both at the same time.

To publish using the canonical_url:

python -m dev_cli publish ~/dev/dev-blog/test.md

To publish using another key:

python -m dev_cli publish -k title ~/dev/dev-blog/test.md

In case of conflict the first found article will be updated.

Metadata

Release files for dev-cli 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dev-cli 0.2.0
File Size Uploaded Provenance
dev-cli-0.2.0.tar.gz 8.2 kB Without provenance Details

Release files / dev-cli-0.2.0.tar.gz

Download URL dev-cli-0.2.0.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ab74aef8ed6b2e18e5f446508efd9d13b603aaa035c8d91f4e2efeacd9b83e5b
BLAKE2b-256 checksum
How to use checksums
0ccf94034cc103b50e88675da532844912b846e2314da47531a7921ffa0141bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.8

Security for dev-cli 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.2.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page