autodevto
v0.1.7
Published
A simple Node.js application to automatically generate and publish articles to your dev.to account.
Readme
autodevto
A simple Node.js application to automatically generate & publish articles to your dev.to account.
Features
- Generates a post summary using Google's Generative AI.
- Saves the draft to your current working directory with a relevant file name.
- Publishes the generated summary to your dev.to account.
- Automatically opens the published article in your default browser.
- Verifies that the post was published successfully.
- Logs the publishing activity to
publish.log. - A beautiful and smooth command-line interface.
Setup
Clone this repository.
Install the dependencies:
npm installCreate a
.envfile in the root of the project with the following content:GEMINI_API_KEY=your_gemini_api_key DEVTO_API_KEY=your_dev.to_api_keyReplace
your_gemini_api_keywith your Google Generative AI API key andyour_dev.to_api_keywith your dev.to API key.
Usage
The tool provides a simple and easy-to-use command-line interface.
autodevto --helpThis will display the help menu:
autodevto <command>
Commands:
autodevto generate [topic] Generate a new tech summary
autodevto publish [draft] Publish the generated summary
autodevto autopublish [topic] Generate and automatically publish a tech summary
Options:
--version Show version number [boolean]
--confirm, -c Confirm to publish [boolean]
--help Show help [boolean]Generate a new draft:
To generate a new tech summary, run the following command:
autodevto generate "autodevto release readme npm"This will generate a new tech summary and save it as
autodevto-release-readme-npm.mdin your current directory.Publish the draft:
By default, the
publishcommand will perform a dry run. To actually publish your article, you need to use the--confirmflag.Dry Run (Default):
autodevto publish autodevto-release-readme-npm.mdThis will show you the content that would be published without posting it to dev.to.
Publish for real:
autodevto publish autodevto-release-readme-npm.md --confirmThis will publish the article and then open it in your default browser.
Autopublish:
To generate and automatically publish a tech summary without manual intervention, use the
autopublishcommand:autodevto autopublish "latest AI trends"This will generate content, save it to a uniquely named draft file in your current directory, publish it, and open the article in your browser. The draft file will be retained.
To-Do
- [ ] Add Image Generation feature.
- [ ] Improve error handling and add more tests.
