FGN: An AI-powered command-line tool for automated file generation.
Project description
File Generator CLI (FGN)
FGN is an advanced command-line tool integrating the capabilities of Artificial Intelligence to automate the creation of diverse file types. It’s a powerful solution for developers, creatives, managers, or anyone engaged in regular file generation tasks.
FGN leverages the power of OpenAI’s GPT models for generating various types of files. This AI integration allows the creation of blogs, code, guides, how-to articles, nano fiction stories, plans, and shell scripts. By merely providing a prompt, you can have a sophisticated AI create meaningful content, saving you time and resources.
Features
AI-powered file generation with a variety of commands (blog, code, guide, how-to articles, nano fiction stories, plans, and shell scripts)
Input and output file specification
Automatic output to file with automatic filename generation
Clipboard pasting
Extensible with new commands
Option for verbose mode for printing output
Installation
FGN is a Python-based command-line tool. Ensure Python and pip are installed on your system. You can install FGN using the following command:
pip install fgn
Usage
The FGN tool is used via command line, where you specify a command and the necessary arguments. The general syntax is:
fgn [OPTIONS] COMMAND [ARGS]...
Command-line Options
-m, --model TEXT The OpenAI model to be used for AGI response.
-i, --input TEXT Path to input file.
-o, --output TEXT Path to output file.
-io, --in-n-out TEXT Path to input and output file.
-pr, --prompt TEXT Prompt itself as a string.
-v, --verbose Enable verbose mode for printing output.
-t, --template TEXT Path to template file.
-e, --example TEXT Path to example file.
-sp, --system-prompt TEXT Path to system prompt file.
-sc, --schema TEXT Path to response schema definition file.
--clear-history Clear the history file.
-ao, --auto-output Automatically output to file with automatic file name.
-as, --auto-summarize INTEGER Automatic summarization after the specified number of messages.
-p, --paste Paste input from the clipboard.
-nc, --no-copy Do not copy output to the clipboard.
-tk, --tokens TEXT Token replacement separated by ;
-ext, --extension TEXT File extension of auto output file.
-d, --dsl TEXT Use the FGN Domain Specific Language.
-a, --append Append to the output file.
--help Show this message and exit.
Commands
blog Create a blog article.
chain Create chain of fgn commands.
code Create a code snippet.
core CLI internal usage only.
dsl Create a new FGN DSL (requires GPT 4).
feedback Create feedback.
fun Create OpenAI function schema.
guide Create a procedural guide.
help Get help with the FGN CLI.
howto Create a how-to article.
lts Let's think step by step how to do this.
nano Create a Nano Fiction story.
plan Create a detailed plan.
prompt Create a new prompt
shell Create a shell script.
summary Create a summary.
template Create a command named by the prompt.
yaml Create yaml.
Examples
Here are some example uses of FGN:
To generate a business plan and save it to “business_plan.txt”, run:
fgn -o business_plan.txt plan "My Business Plan"
To get a full list of commands and options, run:
fgn --help
Key Features
Auto-Output
The auto-output feature is designed to streamline your file creation process. With FGN, you can automatically generate output files using a prompt. The filename is intelligently generated based on the provided prompt, file extensions, and optional parameters. You can control the filename’s length, whether to include the current time in the filename, and more. The tool also prevents filename conflicts by generating unique identifiers.
Pasting from Clipboard
FGN supports direct pasting from the clipboard. This feature is particularly useful when you want to generate files based on the data copied to your clipboard. With the ‘-p’ or ‘–paste’ options, you can paste text directly from the clipboard as the command’s argument. This feature can significantly speed up your workflow, especially when dealing with large amounts of data.
Extensibility
FGN is designed with extensibility in mind. You can add new commands and functionalities to suit your specific needs. This makes FGN adaptable to a variety of use cases, be it a developer needing to automate code generation or a writer looking to automate blog post creation. FAQ — Answers to frequently asked questions can be found in our FAQ section [link to FAQ section]. If you can’t find what you’re looking for, feel free to submit an issue through our GitHub page.
Contributing
We welcome your contributions to FGN! Contributions can range from bug fixes, documentation improvements, to proposing new features.
Please refer to our CONTRIBUTING.rst file for more details on how you can contribute to the project.
License
FGN is licensed under the terms of the MIT License. For full details, see the LICENSE file.
Support
For issues or queries about FGN, open a GitHub issue [link to issue tracker]. For additional support, please contact our helpdesk at support@fgn.com.
Making Changes & Contributing
This project uses pre-commit. Please install it before making any changes:
pip install pre-commit
cd fgn
pre-commit install
Update the hooks to the latest version:
pre-commit autoupdate
Note to contributors: also install and use pre-commit.
Note
This project has been set up using PyScaffold 4.5. For details and usage information on PyScaffold see https://pyscaffold.org/.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file fgn-2023.9.29.tar.gz
.
File metadata
- Download URL: fgn-2023.9.29.tar.gz
- Upload date:
- Size: 458.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1bf62a7a9f9d41d7ce39c135e51539de415874d08d91ceb5ecac971dac233fec |
|
MD5 | 67a4570ad693ee9987f181fa25f98420 |
|
BLAKE2b-256 | 6387239a714b4cf320a3679219cd99e695ef2bce4e9e7d2022aa5bbe3ce6aa47 |
File details
Details for the file fgn-2023.9.29-py3-none-any.whl
.
File metadata
- Download URL: fgn-2023.9.29-py3-none-any.whl
- Upload date:
- Size: 125.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9e34ca66fe8d3532c31f78e38666b51ed2e3a8d80842da72a379554cd34c9a4 |
|
MD5 | c21183cd8933e90ed5706e7d107ce5e8 |
|
BLAKE2b-256 | 8fce92d17883ce7590e8db46813af57eeb1390e98c9ec0903581b6dfce4ee527 |