Skip to main content

Write in your editor. Publish to Dev.to. Track what works.

Project description

devpub - Write in your editor. Publish to Dev.to. Track what works.



The Dev.to CLI that uses 98% of the API. Competitors use 20%.

CI License: MIT Python 3.10+ Status: Beta PRs Welcome


๐Ÿš€ Getting Started | ๐Ÿ“– Commands | โš™๏ธ Configuration | ๐Ÿค Contributing


devpub is a command-line tool for developers who write on Dev.to. Write articles in your favorite editor, version control them with Git, publish with one command, and track analytics, all from the terminal.

It uses 98% of the Dev.to API surface, including endpoints no other tool touches: semantic search, ML-powered content concepts, and full analytics.

๐Ÿ† Why devpub?

Existing Dev.to tools are either abandoned, broken, or only cover basic publishing. devpub is different:

Feature devpub devto-cli slinkity dev-to-git
Publish from CLI โœ… โœ… โŒ โŒ
Pull articles to local โœ… โŒ โŒ โœ…
Terminal analytics โœ… โŒ โŒ โŒ
Semantic search โœ… โŒ โŒ โŒ
Trend discovery โœ… โŒ โŒ โŒ
Article validation โœ… โŒ โŒ โŒ
Rate limiting โœ… โŒ N/A โŒ
Actively maintained โœ… โŒ (2y stale) โŒ โŒ (3y stale)

๐Ÿ“ฆ Installation

From source (recommended during beta):

git clone https://github.com/simplynadaf/devpub.git
cd devpub
pip install -e .

With pip (once published to PyPI):

pip install devpub

Requirements: Python 3.10 or higher.

๐Ÿš€ Quick Start

# 1. Set your API key (get it at https://dev.to/settings/extensions)
export DEVPUB_API_KEY=your_key_here

# 2. Initialize a project
devpub init

# 3. Create your first article
devpub new "My Article Title"

# 4. Edit the article in your editor, then publish
devpub push -f articles/my-article-title.md

# 5. Check how it's performing
devpub stats

๐Ÿ“– Commands

โœ๏ธ Writing

Command Description
devpub init Initialize a devpub project (creates .devpub/ config and articles/ directory)
devpub new "Title" Create a new article from a template
devpub new "Title" -t tutorial Use a specific template (default, til, tutorial, comparison, experience)
devpub validate Check articles for issues before publishing
devpub validate -f path.md Validate a specific file

๐Ÿš€ Publishing

Command Description
devpub push -f article.md Publish or update a specific article
devpub push --all Push all articles in your project
devpub push --dry-run Preview what would be published
devpub pull Download your published articles from Dev.to
devpub pull --all Include drafts
devpub status Show sync state (local vs Dev.to)

๐Ÿ“Š Analytics

Command Description
devpub stats Lifetime totals (views, reactions, comments, followers)
devpub stats --referrers Traffic sources
devpub stats --followers Follower engagement
devpub dashboard Complete analytics with top articles table

๐Ÿ” Discovery

Command Description
devpub trends Trending topics on Dev.to right now
devpub search "query" Keyword search for articles
devpub search "query" --semantic AI-powered search by meaning (not just keywords)

๐Ÿ”ง Utilities

Command Description
devpub whoami Show your Dev.to profile
devpub doctor Check API connectivity and config
devpub --version Show version

โš™๏ธ Configuration

devpub looks for your API key in this order:

  1. Environment variable: DEVPUB_API_KEY or DEVTO_API_KEY
  2. Project-level: .devpub/.env
  3. Global: ~/.devpub/.env

๐Ÿ”‘ Get your API key at: https://dev.to/settings/extensions

๐Ÿ“ Project Structure

After devpub init, your project looks like:

my-blog/
  .devpub/
    .env          # Your API key (gitignored)
    config.yml    # Project settings
  articles/
    my-post.md   # Your articles with frontmatter

๐Ÿ“ Article Frontmatter

---
title: "Your Article Title"
published: false
description: "Brief description for SEO"
tags: python, tutorial, beginners
cover_image: https://example.com/image.png
series: "My Series Name"
canonical_url: https://myblog.com/original-post
---

Your article content in Markdown...

๐Ÿงช Project Status

devpub is in beta. Core functionality works and is tested against the live Dev.to API, but:

  • โš ๏ธ The API surface is large and some edge cases may not be handled
  • โš ๏ธ Error messages could be more specific in some situations
  • โš ๏ธ Performance for accounts with 500+ articles could be improved

We follow semantic versioning. Until v1.0, minor versions may include breaking changes (documented in CHANGELOG.md).

๐Ÿค Contributing

We welcome contributions of all kinds! See CONTRIBUTING.md for details.

Quick version:

git clone https://github.com/simplynadaf/devpub.git
cd devpub
pip install -e ".[dev]"
pytest

Ways to contribute

  • ๐Ÿ› Report bugs -- open an issue
  • ๐Ÿ’ก Request features -- open an issue
  • ๐Ÿ”ง Fix bugs -- check good first issues
  • ๐Ÿ“ Improve docs -- README, docstrings, examples
  • โœ… Add tests -- especially for edge cases

Before submitting a PR

  1. Fork the repo and create a branch
  2. Make your changes
  3. Run pytest and ruff check src/ tests/
  4. Open a PR with a clear description

๐Ÿ”’ Security

If you discover a security vulnerability, please report it responsibly. See SECURITY.md for details. Do not open a public issue for security vulnerabilities.

๐Ÿ“„ License

MIT -- use it however you want.

๐Ÿ™ Acknowledgments


Made with โค๏ธ by Sarvar Nadaf

โญ If devpub saves you time, consider giving it a star!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

devpub-0.1.0.tar.gz (26.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

devpub-0.1.0-py3-none-any.whl (23.9 kB view details)

Uploaded Python 3

File details

Details for the file devpub-0.1.0.tar.gz.

File metadata

  • Download URL: devpub-0.1.0.tar.gz
  • Upload date:
  • Size: 26.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.12

File hashes

Hashes for devpub-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1246fa9326b9b47098abed73f5f70646ee20d7cf764eeb79834f03ba26ef5660
MD5 272f67bebb0ecaac7d6bd91aa8e91edf
BLAKE2b-256 6659a6895a298811a1029d07e3312f3320bf8f43da231a46e5ef5e095734ea04

See more details on using hashes here.

File details

Details for the file devpub-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: devpub-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 23.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.10.12

File hashes

Hashes for devpub-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 97197773e5f6df4c01dfacac342eb258da6c11b672ae990cf53b7989ca3897b4
MD5 e663d68d6e7680879bb52b53e1ec2494
BLAKE2b-256 441fcd7119d2f43de286cac747db4faf1f17603510e39a6ed6ba798110fbcf43

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page