{"id":46360022,"url":"https://github.com/sandialabs/talkpipe-writing-assistant","last_synced_at":"2026-03-09T03:08:15.291Z","repository":{"id":320122970,"uuid":"1080814416","full_name":"sandialabs/talkpipe-writing-assistant","owner":"sandialabs","description":"AI collaborative writing assistant ","archived":false,"fork":false,"pushed_at":"2026-03-02T19:50:00.000Z","size":5203,"stargazers_count":2,"open_issues_count":7,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-05T04:52:02.803Z","etag":null,"topics":["scr-3294","snl-applications","snl-data-analysis"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sandialabs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-21T22:55:43.000Z","updated_at":"2026-03-03T03:28:37.000Z","dependencies_parsed_at":"2025-10-22T04:27:26.431Z","dependency_job_id":"7487cf63-dad0-4ea3-9edb-c63adf68246a","html_url":"https://github.com/sandialabs/talkpipe-writing-assistant","commit_stats":null,"previous_names":["sandialabs/talkpipe-writing-assistant"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/sandialabs/talkpipe-writing-assistant","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandialabs%2Ftalkpipe-writing-assistant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandialabs%2Ftalkpipe-writing-assistant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandialabs%2Ftalkpipe-writing-assistant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandialabs%2Ftalkpipe-writing-assistant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sandialabs","download_url":"https://codeload.github.com/sandialabs/talkpipe-writing-assistant/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandialabs%2Ftalkpipe-writing-assistant/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30281166,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T02:57:19.223Z","status":"ssl_error","status_checked_at":"2026-03-09T02:56:26.373Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["scr-3294","snl-applications","snl-data-analysis"],"created_at":"2026-03-05T01:02:26.779Z","updated_at":"2026-03-09T03:08:15.283Z","avatar_url":"https://github.com/sandialabs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ccenter\u003e\u003cimg src=\"docs/logo.png\" width=400\u003e\u003c/center\u003e\n\n# TalkPipe Writing Assistant\n\nMaking the AI write _with_ you, not _for_ you.\n\nAn AI-powered writing assistant that transforms how you create structured documents. This application combines intelligent content generation with intuitive document management, enabling writers to craft professional documents with contextually-aware AI assistance that understands your style, audience, and objectives.\n\nBuilt on the [TalkPipe framework](https://github.com/sandialabs/talkpipe), this tool helps you:\n\n- **Break writer's block**: Generate initial drafts and ideas for any section\n- **Maintain consistency**: AI understands your document's context, style, and tone across all sections\n- **Iterate quickly**: Multiple generation modes (rewrite, improve, proofread, ideas) let you refine content efficiently\n- **Stay organized**: Structure documents into sections with main points and supporting text\n- **Work offline**: Use local LLMs via Ollama or cloud-based models via OpenAI, Anthropic, and more\n\n\u003ccenter\u003e\u003cimg src=\"docs/screenshot.png\" width=80%\u003e\u003c/center\u003e\n\n## Features\n\n- **Multi-User Support**: JWT-based authentication with per-user document isolation\n- **Structured Document Creation**: Organize your writing into sections with main points and user text\n- **AI-Powered Generation**: Generate contextually-aware paragraph content using advanced language models\n- **Multiple Generation Modes**:\n  - **Rewrite**: Complete rewrite with new ideas and improved clarity\n  - **Improve**: Polish existing text while maintaining structure\n  - **Proofread**: Fix grammar and spelling errors only\n  - **Ideas**: Get specific suggestions for enhancement\n- **Real-time Editing**: Dynamic web interface for seamless writing and editing\n- **Document Management**: Save, load, and manage multiple documents with automatic snapshots\n- **User Preferences**: Per-user AI settings, writing style, and environment variables\n- **Customizable Metadata**: Configure writing style, tone, audience, and generation parameters\n- **Flexible AI Backend**: Support for OpenAI (GPT-4, GPT-4o), Anthropic (Claude 3.5 Sonnet, Claude 3 Opus), and Ollama (llama3, mistral, etc.)\n- **Database Storage**: SQLite database with configurable location for easy backup and deployment\n- **Async Processing**: Efficient queuing system for AI generation requests\n\n## Installation\n\n### Prerequisites\n\n- Python 3.11 or higher\n- An AI backend: OpenAI, Anthropic, or Ollama (local)\n\n### Install from pip (Recommended)\n\n```bash\npip install talkpipe-writing-assistant\n```\n\nAfter installation, you can start the application immediately:\n\n```bash\nwriting-assistant\n```\n\nThen navigate to `http://localhost:8001` in your browser. See the [Quick Start](#quick-start) section below for next steps.\n\n### Install from source\n\n```bash\ngit clone https://github.com/sandialabs/talkpipe-writing-assistant.git\ncd talkpipe-writing-assistant\npip install -e .\n```\n\n### Development Installation\n\n```bash\ngit clone https://github.com/sandialabs/talkpipe-writing-assistant.git\ncd talkpipe-writing-assistant\npip install -e .[dev]\n```\n\n### Using Docker\n\n```bash\n# Production deployment\ndocker-compose up talkpipe-writing-assistant\n\n# Development with live reload\ndocker-compose --profile dev up talkpipe-writing-assistant-dev\n```\n\n## Quick Start\n\n**TL;DR:** After `pip install talkpipe-writing-assistant`, just run `writing-assistant` and open `http://localhost:8001` in your browser!\n\nAfter installing with pip, follow these steps to get started:\n\n### 1. Start the Server\n\n```bash\nwriting-assistant\n```\n\nThe server will start on `http://localhost:8001` and display:\n\n```\n🔐 Writing Assistant Server - Multi-User Edition\n📝 Access your writing assistant at: http://localhost:8001/\n🔑 Register a new account at: http://localhost:8001/register\n🔐 Login at: http://localhost:8001/login\n📚 API documentation: http://localhost:8001/docs\n💾 Database: /home/user/.writing_assistant/writing_assistant.db\n```\n\n### 2. Create Your Account\n\n1. Open your browser and navigate to `http://localhost:8001/register`\n2. Enter your email address and password\n3. Click \"Register\" to create your account\n\n### 3. Configure AI Backend\n\nYou need to configure one of the supported AI backends:\n\n**Option A: OpenAI (Cloud)**\n1. Get an API key from [OpenAI Platform](https://platform.openai.com/api-keys)\n2. Set your API key:\n   ```bash\n   export OPENAI_API_KEY=\"sk-your-api-key-here\"\n   ```\n3. In the web interface: Settings → AI Settings → Set Source to `openai` and Model to your model of choice.\n\n**Option B: Anthropic (Cloud)**\n1. Get an API key from [Anthropic Console](https://console.anthropic.com/)\n2. Set your API key:\n   ```bash\n   export ANTHROPIC_API_KEY=\"sk-ant-your-api-key-here\"\n   ```\n3. In the web interface: Settings → AI Settings → Set Source to `anthropic` and Model to your model of choice.\n\n**Option C: Ollama (Local, Free)**\n1. Install Ollama from [ollama.com](https://ollama.com)\n2. Pull a model: `ollama pull [model name]`\n3. Start Ollama: `ollama serve`\n4. In the web interface: Settings → AI Settings → Set Source to `ollama` and Model to [model name]\n\n### 4. Start Writing!\n\n1. Click \"Create New Document\"\n2. Add a title and sections, leaving a blank line between sections.\n3. Click \"Generate\" on any section to create AI-assisted content\n4. Save your work with the \"Save Document\" button\n\nThat's it! You're ready to use the AI writing assistant.\n\n## Usage\n\n### Starting the Server\n\n```bash\n# Default: http://localhost:8001\nwriting-assistant\n\n# Custom port\nwriting-assistant --port 8080\n\n# Custom host and port\nwriting-assistant --host 0.0.0.0 --port 8080\n\n# Enable auto-reload for development\nwriting-assistant --reload\n\n# Custom database location\nwriting-assistant --db-path /path/to/database.db\n\n# Disable custom environment variables from UI (security)\nwriting-assistant --disable-custom-env-vars\n\n# Initialize database without starting server\nwriting-assistant --init-db\n\n# You can also use environment variables\nWRITING_ASSISTANT_PORT=8080 writing-assistant\nWRITING_ASSISTANT_RELOAD=true writing-assistant\nWRITING_ASSISTANT_DB_PATH=/path/to/database.db writing-assistant\n```\n\nWhen the server starts, it will display:\n- The URL to access the application\n- Registration and login URLs\n- API documentation URL\n- Database location\n\n**Authentication:** The application uses JWT-based multi-user authentication with FastAPI Users. Each user has their own account with secure password storage. New users can register through the web interface at `/register`, and existing users log in at `/login`.\n\n### Environment Variables\n\nConfigure the application with these environment variables:\n\n| Variable | Description | Default |\n|----------|-------------|---------|\n| `WRITING_ASSISTANT_HOST` | Server host address | `localhost` |\n| `WRITING_ASSISTANT_PORT` | Server port number | `8001` |\n| `WRITING_ASSISTANT_RELOAD` | Enable auto-reload (development) | `false` |\n| `WRITING_ASSISTANT_DB_PATH` | Database file location | `~/.writing_assistant/writing_assistant.db` |\n| `WRITING_ASSISTANT_SECRET` | JWT secret key for authentication | Auto-generated (change in production) |\n| `TALKPIPE_OLLAMA_SERVER_URL` | Ollama server URL for local models | `http://localhost:11434` |\n\n\n**Security Options:**\n- `--disable-custom-env-vars`: Prevents users from configuring environment variables through the browser interface\n  - Use this for shared deployments or when you want centralized credential management\n  - Environment variables must be set at the server level (via shell environment)\n  - The Environment Variables section will be hidden in the UI\n\n\n**Configure document metadata**:\n   - AI Source: `openai`, `anthropic`, or `ollama`\n   - Model: e.g., `gpt-4`, `claude-3-5-sonnet-20241022`, or `llama3.1:8b`\n   - Writing style: formal, casual, technical, etc.\n   - Target audience: general public, experts, students, etc.\n   - Tone: neutral, persuasive, informative, etc.\n   - Word limit: approximate words per paragraph\n\n### Document Storage\n\nDocuments are stored in an SQLite database with multi-user isolation:\n\n**Default Location:** `~/.writing_assistant/writing_assistant.db`\n\n**Custom Location:** Use `--db-path` or `WRITING_ASSISTANT_DB_PATH` to specify an alternative location\n\n**Features:**\n- Per-user document isolation (users only see their own documents)\n- Automatic snapshot management (keeps 10 most recent versions)\n- User-specific preferences (AI settings, writing style, etc.)\n- Cascade deletion (removing a user deletes all their documents)\n\n**Backup:** Simply copy the database file to create a backup. The database can be moved to a different location using the `--db-path` option.\n\n## Architecture\n\n### Package Structure\n\n```\nsrc/writing_assistant/\n├── __init__.py          # Package initialization and version\n├── core/                # Core business logic\n│   ├── __init__.py\n│   ├── callbacks.py     # AI text generation functionality\n│   ├── definitions.py   # Data models (Metadata)\n│   └── segments.py      # TalkPipe segment registration\n└── app/                 # Web application\n    ├── __init__.py\n    ├── main.py          # FastAPI application and API endpoints\n    ├── server.py        # Application entry point\n    ├── static/          # CSS and JavaScript assets\n    └── templates/       # Jinja2 HTML templates\n```\n\n### Core Components\n\n- **Metadata**: Configuration for writing style, audience, tone, and AI settings\n- **Section**: Individual document sections with async text generation and queuing\n- **Document**: Complete document with sections, metadata, and snapshot management\n- **Callbacks**: AI text generation using TalkPipe with context-aware prompting\n\n\n## Troubleshooting\n\n### Application Issues\n\n**\"Port already in use\"**\n- Change the port: `writing-assistant --port 8080`\n- Or kill the process using the port\n\n**\"Cannot save document\"** or **\"Database error\"**\n- Check write permissions to the database directory (default: `~/.writing_assistant/`)\n- Ensure the directory exists: `mkdir -p ~/.writing_assistant`\n- Try a different database location: `writing-assistant --db-path /tmp/test.db`\n- Initialize the database manually: `writing-assistant --init-db`\n\n**\"Authentication failed\"** or **\"Invalid credentials\"**\n- Double-check your email and password\n- Register a new account if you haven't already\n- The database may have been reset - check the database location\n\n**\"Cannot connect to database\"**\n- Verify the database file exists and is not corrupted\n- Check file permissions on the database file\n- Try initializing a new database: `writing-assistant --db-path /tmp/new.db --init-db`\n\n\n## License\n\nThis project is licensed under the Apache License 2.0. See the [LICENSE](https://github.com/sandialabs/talkpipe-writing-assistant/blob/master/LICENSE) file for details.\n\n## Acknowledgments\n\nBuilt with [TalkPipe](https://github.com/sandialabs/talkpipe), a flexible framework for AI pipeline construction developed at Sandia National Laboratories.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandialabs%2Ftalkpipe-writing-assistant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsandialabs%2Ftalkpipe-writing-assistant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandialabs%2Ftalkpipe-writing-assistant/lists"}