Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update Twitter plugin README #1707

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 83 additions & 1 deletion packages/plugin-twitter/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,85 @@
# `@elizaos/plugin-twitter`

This plugin provides actions for posting tweets to Twitter/X using web automation.

---

## Configuration

### Required Environment Variables

Add the following credentials to your `.env` file:

```env
TWITTER_USERNAME=your-twitter-username
TWITTER_PASSWORD=your-twitter-password
TWITTER_EMAIL=your-email-address
TWITTER_2FA_SECRET=your-2fa-secret-if-enabled
```

### Optional Settings

Additional configuration options:

```env
# Enable dry run mode (logs tweets without posting)
TWITTER_DRY_RUN=true

# Enable premium features (removes 180 char limit)
TWITTER_PREMIUM=true
```

## Provider

The Twitter plugin doesn't include a provider, as it focuses on action-based interactions with Twitter.

---

## Actions

### Post Tweet

Posts tweets to Twitter/X with automatic content generation based on context. Features:

- Automatic content generation based on conversation context
- Character limit handling (180 chars, unless premium)
- Dry run support for testing
- Error handling and logging

**Example usage:**

```bash
# These commands will trigger tweet generation and posting
Tweet that
Share this on Twitter
Post this on X
```

---

## Contribution

The plugin contains TypeScript types and templates. Please ensure any contributions maintain type safety and follow the existing patterns.

### Development

To work on this plugin:

```bash
# Install dependencies
pnpm install

# Build the plugin
pnpm build

# Run tests (when implemented)
pnpm test
```

### Templates

The plugin uses a structured template system for tweet generation. See `src/templates.ts` for the tweet generation prompt structure.
=======
# @elizaos/plugin-twitter

A plugin for Twitter/X integration, providing automated tweet posting capabilities with character-aware content generation.
Expand Down Expand Up @@ -254,4 +336,4 @@ For more information about Twitter/X integration capabilities:

## License

This plugin is part of the Eliza project. See the main project repository for license information.
This plugin is part of the Eliza project. See the main project repository for license information.
Loading