npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@tokenring-ai/writer

v0.2.5

Published

TokenRing Writer Application

Downloads

688

Readme

TokenRing Writer (tr-writer)

Overview

TokenRing Writer (tr-writer) is a unified platform for writing and managing news articles & blog posts. It provides a powerful interface where you can create, edit, and publish content, leveraging AI to assist with writing, editing, formatting, and publishing workflows.

Features

  • Agent-based architecture: Multiple specialized AI agents for different content creation tasks (writer, editor, researcher, publisher).
  • Interactive chat interface: Talk to agents in a conversational REPL for content creation assistance.
  • Persistent content history: Sessions and content drafts are saved in a SQLite database.
  • Command system: Issue commands prefixed with / to manage agents, content, and workflows.
  • Publishing integration: Works directly with your content directory; can initialize with a TokenRing config.
  • Multi-model support: Support for various AI models from different providers.
  • Research capabilities: Built-in web search and Wikipedia integration for content research.
  • File system integration: Direct integration with local and cloud file systems.

Available Agents

TokenRing Writer includes specialized AI agents for different content creation workflows:

  • Content Writer: Expert content writer specializing in creating engaging, well-structured articles and blog posts. Excels at research, storytelling, and adapting writing style to different audiences.
  • Managing Editor: Coordinates content creation by searching for trending news topics, evaluating newsworthiness, creating article assignments, and dispatching tasks to specialized writing agents.

Getting Started

Quick Start (NPM)

Run directly using npx without installation:

npx @tokenring-ai/writer --source ./path-to-your-content --initialize

Quick Start (Docker)

Pull and run from GitHub Container Registry:

docker pull ghcr.io/tokenring-ai/writer:latest
docker run -ti --net host $(env | grep '_KEY' | sed 's/^/-e /') -v ./path-to-your-content:/repo:rw ghcr.io/tokenring-ai/writer:latest

Prerequisites

  • Bun (for local development)
  • Git initialized content directory

Installation (local development)

  1. Sync git submodules: This project uses git submodules that need to be initialized and updated before installation:

    git submodule update --init --recursive
  2. Install dependencies: This project uses Bun as the package manager in a monorepo structure:

    bun install
  3. Run the application: Use Bun to start the application:

bun src/tr-writer.ts --source ./path-to-your-content

Installation (As local docker container)

  1. Sync git submodules: This project uses git submodules that need to be initialized and updated before installation:

    git submodule update --init --recursive
  2. Build the docker container:

    # This command must be run in the root directory of the repo
    docker build -t token-ring/writer:latest -f docker/Dockerfile .
  3. Run the docker container:

    docker run -ti --net host $(env | grep '_KEY' | sed 's/^/-e /') -v ./:/repo:rw token-ring/writer:latest

Container Registry

The Docker image is automatically built and published to GitHub Container Registry on version tags. Available tags:

  • latest: Latest stable release
  • v*.*.*: Specific version tags
  • main: Latest build from main branch
docker pull ghcr.io/tokenring-ai/writer:latest

Initialization

To initialize your content directory with the necessary TokenRing configuration file, pass the --initialize flag after your content directory. This will initialize a new .tokenring directory in your project, which stores a writer-config.js config file for your project that you can customize, as well as a sqlite database which stores your content history.

tr-writer --source ./path-to-your-content --initialize

This copies a default .tokenring/writer-config.js into your content directory.

Chat and Commands

Once started, you enter the agent chat REPL:

  • Type natural language queries to interact with AI agents for content creation.
  • Use commands with / prefix, e.g., /help, /agent switch writer, /tools enable.
  • Switch between different agents specialized for writing, editing, research, and publishing.
  • Control commands: /quit to exit, /agent list to see available agents.

Commands

Some example commands:

  • /help: Show available commands.
  • /agent list: List available agents.
  • /agent switch <name>: Switch to a specific agent.
  • /tools list: Show available tools.
  • /tools enable <pattern>: Enable specific tools.

Architecture

  • CLI: Entry point with argument parsing and agent team initialization (tr-writer.ts).
  • Agents: Specialized AI agents for different content creation tasks (writer, editor, researcher, publisher).
  • Services: Core services for file system, web search, models, and database management.
  • Configuration: Flexible configuration system supporting multiple models and services.

Data Persistence

Content data and sessions are stored in a SQLite database (writer-database.sqlite) managed through the Bun SQLite package.

Extensibility

The system supports:

  • Custom agents: Define new agents with specific roles and capabilities.
  • Multiple AI models: Support for various providers (OpenAI, Anthropic, Google, etc.).
  • Service providers: Pluggable services for file systems, web search, and content publishing.
  • Tool integration: Extensible tool system for agent capabilities.

Contributing

Contributions are welcome! Feel free to fork the repository and submit pull requests.

License

This project is MIT licensed


This README provides a high-level overview of the TokenRing Writer (tr-writer) functionality and usage. For detailed command usage, use /help inside the chat REPL.