A CLI tool for tag-based text processing.
Project description
TagWriting
TagWriting is a CLI tool that enables fast and flexible text generation by simply enclosing prompts in tags within your text files. It is designed to be simple, stateless, and editor-agnostic, making it easy to integrate into any workflow.
Overview
TagWriting is a tool that connects AI and humans more seamlessly through text files. By monitoring a directory, TagWriting will automatically convert text or Markdown files as soon as they are saved.
I am TagWriting.
<prompt>Describe the best feature of TagWriting in one sentence.</prompt>
↓
I am TagWriting.
You can quickly generate text just by enclosing it in tags.
Usage
- Edit a file such as
.mdand enclose your prompt in tags - When you save, the tagged section is converted by the LLM
- The result is written directly to the file
Why TagWriting?
Seamless with Text Editing
Just enclose prompts directly in your text with tags. No need to stop your workflow to operate the LLM. You can leverage AI without interrupting your train of thought.
High Readability
By explicitly writing tags, it’s clear which parts you want the AI to handle. Document history and edits are also clear.
Flexibility & Compatibility
TagWriting directly rewrites updated text files. In theory, it works with any editor and any format. As long as your editor supports file reload, you’re ready to go—no plugins needed. Use Visual Studio Code, Vim, Emacs, etc.—whatever you like.
Installation (Python)
- Install dependencies:
pip install .
- Use as a command-line tool:
tagwriting
or
tagwriting --watch <directory>
How to use .env
Create a .env file in your project directory and specify your API key, model name, and base URL as follows:
API_KEY=sk-xxxxxxx
MODEL=gpt-3.5-turbo
BASE_URL=https://api.openai.com/v1
or
TAGWRITING_API_KEY=sk-xxxxxxx
TAGWRITING_MODEL=gpt-3.5-turbo
TAGWRITING_BASE_URL=https://api.openai.com/v1
- The
.envfile in the directory where you run thetagwritingcommand will be loaded automatically. - If you want to use different settings for multiple projects, prepare a separate
.envfor each directory. - Any OpenAPI-compatible endpoint can be used (e.g., Grok, Deepseek, etc.).
Happy Hacking!
More detail? Let's read the Japanese version in GitHub. (Sorry, I'm Japanese and English is not my native language.)
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tagwriting-0.3.1.7.tar.gz.
File metadata
- Download URL: tagwriting-0.3.1.7.tar.gz
- Upload date:
- Size: 17.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b84edab29c5efb963f0ee2735505b25d06984af4d0b02a9541a5f2443333662
|
|
| MD5 |
77b354f6f971b2510d5337a37cfc751b
|
|
| BLAKE2b-256 |
4c34618ea80c28518cfde342591cc7754efd03b93883d5b5f09b4a6242c4e94c
|
File details
Details for the file tagwriting-0.3.1.7-py3-none-any.whl.
File metadata
- Download URL: tagwriting-0.3.1.7-py3-none-any.whl
- Upload date:
- Size: 14.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
743f5465b5f8a50a293b8c39ffe8ffce67f52d5f594cfc0f89c03740ebff95b0
|
|
| MD5 |
625aacbd107a5ae8be19fa8f3196f3fa
|
|
| BLAKE2b-256 |
fba3cfd8ae569d1d4b40f7c1dee738233985551157278122a817a8f468b5dbb3
|