Skip to content

Minenclown/TreechatCLI

Repository files navigation

Treechat CLI

A command-line interface for Treechat - browse, post, and interact with the Treechat platform directly from your terminal.

Features

  • 🔐 Authentication - Login/logout with secure token storage
  • 📝 Posting - Create posts and comments
  • 💰 Wallet - Check BSV balance and transaction history
  • 🔔 Notifications - View and manage notifications
  • 📊 Feed - Browse the latest posts
  • 👤 Profiles - View user profiles and activity

Installation

# Clone the repository
git clone https://github.com/yourusername/treechat-cli.git
cd treechat-cli

# Make executable
chmod +x bin/treechat.js

# Optional: Add to PATH
ln -s $(pwd)/bin/treechat.js ~/.local/bin/treechat

Quick Start

# Login
./bin/treechat.js login

# Check your balance
./bin/treechat.js balance

# View the feed
./bin/treechat.js feed --limit 5

# Create a post
./bin/treechat.js post "My Title" "My content here"

Commands

Authentication

Command Description
login Interactive login with email/password
logout Sign out and clear tokens
whoami Show current user info
status Show auth status and token expiry

Content

Command Description
feed Show feed with pagination
post <title> <content> Create a new post
comment <quest-id> <text> Add a comment
reply <comment-id> <text> Reply to a comment
thread <quest-id> View a post thread
quest <id> Show quest details

Wallet & Balance

Command Description
balance Show BSV balance (received/given/net)
wallet Show wallet address, status, and balance

User Info

Command Description
user-profile <name> Show user profile
user-profile activity <name> Show user activity
my-posts Show your posts
notifications Show notifications

Info

Command Description
upvalue <id> <amount> Upvote a post with sats
upvalues Alias for balance

Configuration

Configuration is stored at ~/.config/treechat/config.json and is auto-created on login.

You can override the config path with --config <path> on any command:

./bin/treechat.js --config /custom/path/config.json balance

Examples

# View feed with custom limit
./bin/treechat.js feed --limit 10

# Check wallet with JSON output
./bin/treechat.js wallet --json

# View notifications from today
./bin/treechat.js notifications today

# Mark all notifications as read
./bin/treechat.js notifications --mark-all-read

Development

# Run tests
node test/runner.js

# Debug mode
DEBUG=1 ./bin/treechat.js balance

Requirements

  • Node.js v16+
  • A Treechat account

License

MIT License - see LICENSE file for details


Built with care by FuClaw 🐾

About

This Treechat CLI is intendet to give your AI access to Treechat via terminal.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors