{"id":15064345,"url":"https://github.com/christophebe/julius-gpt","last_synced_at":"2025-04-07T17:09:36.478Z","repository":{"id":144938438,"uuid":"615478705","full_name":"christophebe/julius-gpt","owner":"christophebe","description":"Generate and publish your content from the command line with the help of AI (GPT) 🤯","archived":false,"fork":false,"pushed_at":"2025-03-27T01:01:23.000Z","size":1847,"stargazers_count":54,"open_issues_count":10,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-31T15:20:04.826Z","etag":null,"topics":["ai","chat-gpt","claude","content","content-generator","contentgeneration","gpt-35-turbo","image-generator","langchain-js","llm","mistral","openai-api","prompt","prompt-engineering"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/christophebe.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-17T19:44:10.000Z","updated_at":"2025-03-27T05:47:33.000Z","dependencies_parsed_at":"2024-01-14T10:26:30.148Z","dependency_job_id":"87eebf1e-8d38-4740-b6c4-6ae9c74b95d4","html_url":"https://github.com/christophebe/julius-gpt","commit_stats":{"total_commits":178,"total_committers":3,"mean_commits":"59.333333333333336","dds":"0.022471910112359605","last_synced_commit":"73026e059bfe1281b25beacdd0d45c7ebedad7ef"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christophebe%2Fjulius-gpt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christophebe%2Fjulius-gpt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christophebe%2Fjulius-gpt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christophebe%2Fjulius-gpt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/christophebe","download_url":"https://codeload.github.com/christophebe/julius-gpt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247694876,"owners_count":20980733,"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":["ai","chat-gpt","claude","content","content-generator","contentgeneration","gpt-35-turbo","image-generator","langchain-js","llm","mistral","openai-api","prompt","prompt-engineering"],"created_at":"2024-09-25T00:15:51.153Z","updated_at":"2025-04-07T17:09:36.451Z","avatar_url":"https://github.com/christophebe.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"This Node.js CLI and API gives you the ability to generate content (blog post, landing pages, ...) with a LLM (OpenAI, ...). It can generate text in all languages supported by the available LLMs.\n\nThis project is using [Langchain JS](https://js.langchain.com/docs/get_started/introduction)\n\n# Features\n\n🔄 Different modes for generating content: automatic, interactive, or with a content template.\n\n🧠 Supported LLMs : OpenAI (stable), Mistral (experimental), Claude (upcoming release), Groq (upcoming release).\n\n🌍 All languages supported by the available LLMs.\n\n🔥 SEO friendly : generate post title, description \u0026 slug. \n\n✍️ Default or custom prompts.\n\n⚙️ Fine-tuning with completion parameters.\n\n📝 Publish content on WordPress.\n\n🌐 API.\n\n🔜 Upcoming features: image generations, RAG, publish on NextJS.\n\n\n# Table of Content\n\n\n- [Features](#features)\n- [How it Works ?](#how-it-works-)\n  - [1. Interactive / Automatic Mode](#1-interactive--automatic-mode)\n  - [2. Template Mode](#2-template-mode)\n  - [3. Completion Parameters](#3-completion-parameters)\n  - [4. Publish on Wordpress](#4-publish-on-wordpress)\n- [Warning](#warning)\n- [Examples](#examples)\n  - [version 0.1.1 - Auto mode with custom prompts in french](#version-011---auto-mode-with-custom-prompts-in-french)\n  - [version 0.1.0 - Auto Mode](#version-010---auto-mode)\n  - [version 0.1.1 - Template Markdown](#version-011---template-markdown)\n  - [version 0.1.1 - Template HTML](#version-011---template-html)\n- [Installation](#installation)\n- [CLI](#cli)\n  - [Generate a Post](#generate-a-post)\n    - [Automatic Mode](#automatic-mode)\n    - [Interactive Mode](#interactive-mode)\n    - [Generate Content Based on a Template](#generate-content-based-on-a-template)\n  - [Supported Models](#supported-models)\n  - [Custom prompts](#custom-prompts)\n    - [Default prompts](#default-prompts)\n    - [Create a custom prompt](#create-a-custom-prompt)\n- [Wordpress related commands](#wordpress-related-commands)\n  - [list](#list)\n  - [add](#add)\n  - [info](#info)\n  - [rm](#rm)\n  - [export](#export)\n  - [import](#import)\n  - [categories](#categories)\n  - [post](#post)\n  - [update](#update)\n- [API](#api)\n- [Some Tools that can Help to Check Quality](#some-tools-that-can-help-to-check-quality)\n- [Credit](#credit)\n\n\n\n# How it Works ?\n\nThis component can be used in different modes: \n- with the CLI ( interactive mode, automatic mode or with the help of a template).\n- In your application with the API. \n\n## 1. Interactive / Automatic Mode\n\nIn **interactive mode**, the CLI will ask you for some parameters (topic/title, language, intent, audience, etc.). \n\nIn **automatic mode**, you need to supply all the necessary parameters to the command line. This mode of operation allows you to create a multitude of contents in series (for example, in a shell script).\n\nBoth modes will use different predefined prompts to generate the content:\n\n- Generate the outline of the post (with the SEO description, SEO title, the slug).\n- Generate the introduction.\n- Generate the content of the different heading of the outline.\n- Generate the conclusion.\n\nThe final result is in Markdown and HTML.\n\n## 2. Template Mode\n\nA template contains a document structure within a series of prompts. Each prompt will be executed in a specific order and will be replaced by the answer provided by the AI.\nIt is possible to use different formats: Markdown, HTML, JSON, etc.\n\nThe main advantage of the template usage is the customisation of the output. You can use your own prompts. Templates are also interesting if you want to produce different contents based on the same structure (product pages, landing pages, etc.).\n\n## 3. Completion Parameters\n\nOne of the problems of AI content generation is the repetition of the main keywords.\nThis script also uses `temperature`, `frequency_penalty`, and `presence_penalty` parameters to try to minimize this.\nSee the [OpenAI API documentation](https://platform.openai.com/docs/api-reference/completions) for more details.\n\n## 4. Publish on Wordpress\n\nWhen generating, the CLI gives you the ability to publish the content to your WordPress blog.\nOther CMS will be supported in the future. We need to support some headless CMS.\n\n## Warning\n\n**This is an experimental project. You are welcome to suggest improvements, like other prompts and other values for the parameters.**\n**The cost of the API calls is not included in the price of the CLI. You need to have an OpenAI API key to use this CLI.**\n**In all cases, you have to review the final output. AI can provide incorrect information.**\n\n# Examples\n\n## version 0.1.1 - Auto mode with custom prompts in french\n\n[Camping-cars écologiques ? Utopie ou réalité en 2024 ?](./examples/cc-eco4.md)\n\n## version 0.1.0 - Auto Mode\n\n```bash\njulius post -fp 1.5 -g -tp \"5\\ reasons\\ to\\ use\\ AI\\ for\\ generating\\ content\" -f ./reasons-to-use-ai-content\n```\n\nMarkdown result : [ 5 Reasons to Use AI for Generating Content](./examples/reasons-to-use-ai-content.md)\n\n\n## version 0.1.1 - Template Markdown\n\n```bash\njulius template-post -f ./dobermann  -t ./template.md  -i breed=dobermann -d\n```\nTemplate : [template.md](./examples/markdown/template.md?plain=1)\n\nMarkdown result : [dobermann.md](./examples/markdown/dobermann.md)\n\n## version 0.1.1 - Template HTML\n\n```bash\njulius template-post -f ./dobermann  -t ./template.html  -i breed=dobermann -d\n```\nTemplate : [template.html](./examples/html/template.html?plain=1)\n\nHTML result : [dobermann.html](./examples/html/dobermann.html)\n\n# Installation\n\nThe CLI and API are available as a NPM package.\n\n```bash\n# for the API\nnpm install julius-gpt -S\n# for the CLI\nnpm install -g julius-gpt\n```\n\n# CLI\n\nThe CLI has 4 groups of commands:\n- prompt : custom prompt management.\n- post: generate a post in interactive or auto mode.\n- template-post : generate a content based on a template. \n- wp: wordpress related commands : list, add, remove, update WP sites \u0026 publish posts.\n\n\n```bash\n~ julius -h                      \nUsage: julius [options] [command]\n\nGenerate and publish your content from the command line 🤯\n\nOptions:\n  -V, --version            output the version number\n  -h, --help               display help for command\n\nCommands:\n  prompt                   Prompt related commands\n  post [options]           Generate a post in interactive or automatic mode\n  template-post [options]  Generate a post based on a content template\n  wp                       Wordpress related commands. The \n\n\n```\n\n## Generate a Post\n\n**You need to have an OpenAI API key to use this CLI**.\nYou can specify your OpenAI API key with the `-k` option or with the environment variable `OPENAI_API_KEY`.\n\nSee the CLI help to get the list of the different options. \n\n```bash\n ~ julius post -h\n```\n\n### Automatic Mode \n\n```bash\n ~ julius post -tp \"5 reasons to use AI for generating content\"\n```\nUse the other parameters to personalize content even further.\n\n**A more advanced command**\n```bash\n ~ julius post -fp 1.5 -g -l french -tp \"Emprunter\\ avec\\ un\\ revenu\\ de\\ retraite\\ :\\ quelles\\ sont\\ les\\ options\\ \\?\" -f ./emprunter-argent-revenu-retraite -c Belgique -d\n```\nThis command will generate a post in French with a frequency penalty of 1.5 for the audience of the country : Belgium. \nThe topic (tp arg) is written in French. \n\n### Interactive Mode\n\n```bash\n ~ julius post -i\n```\nIt is not necessary to use the other parameters. The CLI will ask you some questions about the topic, language, ... \n\n### Generate Content Based on a Template\n\nThe template file can be in the markdown or HTML format. The template extension will be used to determine the final output.\n\n```bash\n ~ julius template-post -t \u003cfile\u003e.[md|html]\n```\n\nThe CLI will execute all prompts mentioned in the template file. Each prompt short-code will be replaced by the output provided by the AI.\n\n**Template structure**\n\nHere is a simple example for the template file:\n\n```\n{{s:Your are an prompt tester. You have to write your answers in a makrdown block code.}}\n{{c:your answer has to be \"Content of prompt 1.\"}}\n\n# Heading 1\n{{c:your answer has to be \"Content of prompt 2.\"}}\n```\n\nPrompt \"s\" is the system prompt\nPrompt with \"c\" are content prompt. they will be replaced by the output provided by the AI.\n\n**Like in Langchain, you can provide some input variables in the template like this one :**\n\n```\n{{s:Your are an prompt tester. You have to write your answers in a makrdown block code in language : {language}.}}\n{{c:Quelle est la capitale de la France ?\"}}\n\n# Heading 1\n{{c: Quelle est la capitale de la Belgique ? \"}}\n```\n\nNow, you can execute this template with the following command : \n\n```bash\n ~ julius template-post -t \u003ctemplate-file\u003e.md -i language=french\n```\n\n\n**This is an experimental feature and the template syntax will be modified in an upcoming release.**\n\n## Supported Models \n\nBy default, the CLI is using the latest Open AI model. We are working on the support of the following ones : \n\n|Provider | Models | Status | .env variable API KEY |\n|---------|--------|---------|----------------------|\n|OpenAI | gpt-4, gpt-4-turbo-preview | Stable | OPENAI_API_KEY |\n|Mistral |  mistral-small-latest, mistral-medium-latest, mistral-large-latest | Experimental | MISTRAL_API_KEY |\n|Anthropic |  Claude | Next Release | NA |\n|Groq | Mistral, Llama | Next Release| NA|\n\nAll models require an API Key. You can provide it either in the .env file or with the CLI parameter '-k'\n\nYou can choose your model with the -m parameter : \n\n```bash\n ~ julius post -m mistral-large-latest ....\n```\n\nUse the help to have the list of the models\n```bash\n ~ julius post -h \n```\nor \n\n```bash\n ~ julius template-post -h \n```\n\n##  Custom prompts\n\n**Why custom prompts?**\n- Default one are too generic.\n- Julius's default prompts are written in English. Customs prompts can be created for a specific language.  \n- Give the possibility to add persona, writing style, remove IA footprint, add custom editorial brief, .... \n\n\n### Default prompts \nJulius uses a set of prompts for content generation that can be customized by creating a new version in a separate directory.\nEach prompt is stored in a different file. \n\n| File name | Description | Inputs |\n|---------------------|-----------------------------------------------------------------------------------|---------------------|\n| system.txt | Can be used as an editorial brief or to add important information such as personas, editorial style, objectives, ... | None\n| audience-intent.txt | Use to generate the audience and intent based on the article's subject. | {language} {topic}|\n| outline.txt | Use to generate article structure. | {language} {topic} {country} {audience} {intent} |\n| introduction.txt | Use to generate the article's introduction. | {language} {topic} |\n| conclusion.txt | Use to generate the article's conclusion. |{language} {topic}|\n| heading.txt | Use to generate the content of each heading. |{language} {headingTitle} {keywords}|\n\n### Create a custom prompt\n\n**1. Make a copy of the default prompts**\n```bash\n ~ julius prompt create [name] [folder]\n```\neg. : \n\n```bash\n ~ julius prompt create discover ./my-prompts\n```\n\nThis command will copy the default prompts into the folder : ./my-prompts/discover\n\n**2. Modify the prompts**\n\nNow, you can modify and/or translate the prompts in this folder\n\n**3. Use your prompts in the CLI**\n\nIn the automatic mode, the cli will ask you the custom prompt path\n\n```bash\n ~ julius -i \n```\n\nYou can also use a CLI parameter \"pf\" to specify the folder path\n\n```bash\n ~ julius -pf ./my-prompts/discover ...\n```\n\n## Wordpress related commands\n\n### list\nThis command displays the list of all registered Wordpress sites in the local file ~/.julius/wordpress.json. \n\n**The domain name or the id of the site can be used for the following commands.**\n\n```bash\n~ julius wp ls\n```\n\n### add\n\nThis command adds a new Wordpress site to the local file ~/.julius/wordpress.json.\n\n```bash\n~ julius wp add www.domain.com:username:password\n```\n\n### info\n\nThis command displays the list of all registered Wordpress sites in the local file ~/.julius/wordpress.json.\n\n```bash\n~ julius wp info www.domain.com|id\n```\n\n### rm\n\nThis command removes a Wordpress site from the local file ~/.julius/wordpress.json.\n\n```bash\n~ julius wp rm www.domain.com|id\n```\n\n### export\n\nThis command exports the list of all registered Wordpress sites in the local file ~/.julius/wordpress.json.\n\n```bash\n~ julius wp export wordpress_sites.json\n```\n\n### import\n\nThis command imports the list of all registered Wordpress sites in the local file ~/.julius/wordpress.json.\n\n```bash\n~ julius wp import wordpress_sites.json\n```\n\n### categories\n\nThis command displays the list of all categories of a Wordpress site.\n\n```bash\n~ julius wp categories www.domain.com|id\n```\n\n### post\n\nThis command creates a new post on a Wordpress site.\nthe JSON file must have the following structure:\n\n```json\n{\n    \"title\": \"The title of the post\",\n    \"slug\": \"the-slug-of-the-post\",\n    \"content\": \"The content of the post\",\n    \"seoTitle\": \"The SEO title of the post\",\n    \"seoDescription\": \"The SEO description of the post\",\n}\n```\n\nThis JSON file can be generated with the command `julius post` or with the API.\n\nBy default, the Wordpress REST API doesn't allow you to update the SEO title and description.\nThis information is managed by different plugins, such as Yoast SEO. You can code a plugin for this.\n\nA plugin example for Yoast can be found in this directory: [julius-wp-plugin](./examples/julius-wp-plugin)\nYou can create a zip and install it from the Wordpress dashboard.\n\nYou can code something similar for other SEO plugins.\n\n```bash\n~ julius wp post www.domain.com|id categoryId post.json\n```\n\n- The first argument is the domain name or the ID of the site.\n- The second argument is the ID of the category on this WordPress. You can get the list of categories with the command `julius wp categories www.domain.com|id`\n- The third argument is a boolean to indicate if the WP used Yoast SEO plugin. If true, the SEO title and description will be published.\n- The fourth argument is the path to the JSON file containing the post.\n\n### update\n\nThis command updates a post on a Wordpress site (title, content, SEO title \u0026 SEO description).\nthe JSON file must have the following structure:\n\n```json\n{\n    \"title\": \"The title of the post\",\n    \"slug\": \"the-slug-of-the-post\",\n    \"content\": \"The content of the post\",\n    \"seoTitle\": \"The SEO title of the post\",\n    \"seoDescription\": \"The SEO description of the post\",\n}\n```\n\nThis JSON file can be generated with the command `julius post` or with the API.\n\n```bash\n~ julius wp update www.domain.com|id slug post.json [-d, --update-date] \n```\n\n- The first argument is the domain name or the ID of the site.\n- The second argument is the slug of the post to update.\n- The third argument is the JSON file.\n- The fourth argument (optional) is to update the publication date or not.\n\n# API\n\nSee the unit tests : tests/test-api.spec.ts\n\n# Some Tools that can Help to Check Quality\n\n- [Quillbot](https://try.quillbot.com/74enc3186nhg):  AI-powered paraphrasing tool will enhance your writing, grammar checker and plagiarism checker.\n- [Originality](https://originality.ai?lmref=fJgVFg): AI Content Detector and Plagiarism Checker.\n\n\n# Credit \n\n- [OpenAI API](https://openai.com/)\n- [Langchain](https://js.langchain.com/docs/get_started/introduction)\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristophebe%2Fjulius-gpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchristophebe%2Fjulius-gpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristophebe%2Fjulius-gpt/lists"}