netresearch / t3-cowriter
With the help of AI you can now work on a page together with a cowriter - a digital assistant that helps you to write your content.
Installs: 10 277
Dependents: 0
Suggesters: 0
Security: 0
Stars: 11
Watchers: 5
Forks: 3
Type:typo3-cms-extension
pkg:composer/netresearch/t3-cowriter
Requires
- php: ^8.2 || ^8.3 || ^8.4
- typo3/cms-backend: ^12.4 || ^13.4
- typo3/cms-core: ^12.4 || ^13.4
- typo3/cms-rte-ckeditor: ^12.4 || ^13.4
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.87
- overtrue/phplint: ^9.5
- phpstan/phpstan: ^1.10 || ^2.0
- phpstan/phpstan-deprecation-rules: ^1.1 || ^2.0
- phpstan/phpstan-strict-rules: ^1.5 || ^2.0
- saschaegerer/phpstan-typo3: ^1.10 || ^2.0
- ssch/typo3-rector: ^2.0 || ^3.0
- typo3/testing-framework: ^7.0 || ^8.0
- dev-main / 3.0.x-dev
- v2.0.0
- v2.0.0-alpha.2
- v2.0.0-alpha.1
- 1.2.7
- 1.2.6
- 1.2.5
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.1
- 1.0.0
- 0.0.2
- 0.0.1
- dev-renovate/major-vitest-monorepo
- dev-renovate/node-24.x
- dev-renovate/jsdom-27.x
- dev-renovate/major-github-artifact-actions
- dev-feature/v3-php85-typo3-v14-nr-llm
- dev-renovate/actions-cache-5.x
- dev-renovate/actions-checkout-6.x
- dev-TYPO3-11
- dev-copilot/add-error-handling-wrong-company-id
- dev-copilot/update-demo-language-models
- dev-feature/typo3-13-compat
- dev-NEXT-53
- dev-NEXT-74
- dev-NEXT-73
This package is auto-updated.
Last update: 2026-01-30 13:21:29 UTC
README
AI-powered content assistant for TYPO3 CKEditor - write better content with help from AI.
Features
- CKEditor Integration: Seamless toolbar button in TYPO3's rich text editor
- Multi-Provider Support: Works with all LLM providers supported by nr-llm (OpenAI, Claude, Gemini, etc.)
- Secure Backend Proxy: API keys never exposed to frontend - all requests proxied through TYPO3 backend
- Model Override: Use
#cw:model-nameprefix to request specific models - XSS Protection: All LLM output is HTML-escaped for defense in depth
Requirements
- PHP 8.5+
- TYPO3 v14
- netresearch/nr-llm extension (LLM provider abstraction)
Installation
Install via Composer:
composer require netresearch/t3-cowriter
Configuration
1. Configure nr-llm Extension
First, set up at least one LLM provider in the nr-llm extension:
- Navigate to Admin Tools → LLM Management
- Add a provider (e.g., OpenAI with your API key)
- Create a model configuration
- Create an LLM configuration and set it as default
2. Add CKEditor Preset
Option A: Use the included preset
Add the cowriter preset to your Page TSconfig:
RTE.default.preset = cowriter
Option B: Extend your existing preset
Add to your RTE configuration YAML:
editor: externalPlugins: cowriter: resource: "EXT:t3_cowriter/Resources/Public/JavaScript/Plugins/cowriter/"
Usage
- Select text in the CKEditor
- Click the Cowriter button in the toolbar
- The selected text is sent to the LLM with a system prompt to improve it
- The improved text replaces your selection
Model Override
Prefix your prompt with #cw:model-name to use a specific model:
#cw:gpt-4o Improve this text
#cw:claude-sonnet-4-20250514 Make this more professional
Architecture
[CKEditor Button] → [AIService.js] → [TYPO3 AJAX]
↓
[AjaxController]
↓
[LlmServiceManagerInterface]
↓
[nr-llm Provider]
↓
[External LLM API]
All LLM requests are proxied through the TYPO3 backend. API keys are stored encrypted and never exposed to the browser.
Development
Prerequisites
- DDEV for local development
- PHP 8.5+ with required extensions
Setup
ddev start ddev composer install ddev install-v14
Testing
# Run all tests make ci # Individual test suites make test-unit # Unit tests make test-functional # Functional tests make test-integration # Integration tests # Code quality make lint # PHP-CS-Fixer make phpstan # PHPStan level 10
Test Coverage
Target: >80% code coverage
make test-coverage open .Build/coverage/html/index.html
Security
- API keys stored in nr-llm with sodium encryption
- All backend AJAX endpoints require TYPO3 authentication
- LLM output HTML-escaped to prevent XSS
- CSRF protection via TYPO3 middleware
- Content Security Policy (CSP) compatible
Migration from v2.x
Version 3.0 removes the frontend-only architecture. API keys are no longer stored in extension settings.
See CHANGELOG.md for migration details.
License
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Contributing
See CONTRIBUTING.md for contribution guidelines.
Contact
Netresearch DTT GmbH - Your TYPO3 and eCommerce experts.
