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

somai-terminal

v1.1.4

Published

SomAI Terminal is a blockchain-based AI messaging platform with a terminal-inspired UI built on the Somnia Testnet network.

Readme

SomAI Terminal

SomAI Terminal is a blockchain-based AI messaging platform with a terminal-inspired UI built on the Somnia Testnet network. It combines the power of blockchain technology with AI capabilities to create a unique messaging experience. Users can chat, create custom tokens, and interact with the Somnia blockchain network through an intuitive terminal-style interface.

Features

  • Blockchain Messaging: Send and receive messages stored on the Somnia blockchain
  • Message Verification: All messages are cryptographically signed for authenticity
  • Token Creation: Create your own ERC-20 tokens directly from the chat interface
  • AI Integration: Interact with an AI assistant when the blockchain is unavailable
  • Terminal UI: Enjoy a nostalgic terminal-inspired user interface
  • Network Information: View and configure Somnia Testnet network details
  • Responsive Design: Works on both desktop and mobile devices

Technologies Used

  • Frontend: Next.js, React, TypeScript, Tailwind CSS
  • Blockchain: Ethereum/Somnia Testnet, ethers.js
  • Smart Contracts: Solidity (ERC-20 Token Factory, Public Chat)
  • AI: Gemini API integration
  • Styling: Custom terminal-inspired CSS, shadcn/ui components
  • Authentication: MetaMask wallet integration
  • State Management: React hooks and context

Project Structure

``` somAI-terminal/ ├── app/ # Next.js app directory │ ├── globals.css # Global styles including terminal UI │ ├── layout.tsx # Root layout component │ └── page.tsx # Main application page ├── components/ # React components │ ├── chat-interface.tsx # Chat UI component │ ├── header.tsx # Application header │ ├── message-bubble.tsx # Message display component │ ├── network-info.tsx # Network information display │ ├── terminal-header.tsx # Terminal window header │ ├── token-card.tsx # Token display component │ └── ui/ # UI components (shadcn/ui) ├── hooks/ # Custom React hooks ├── lib/ # Utility functions and services │ ├── ai-service.ts # AI integration service │ ├── chat-service.ts # Blockchain chat service │ ├── contract-abis.ts # Smart contract ABIs │ ├── network-utils.ts # Network utility functions │ ├── token-service.ts # Token creation service │ └── utils.ts # General utility functions └── public/ # Static assets ```

Installation

Prerequisites

  • Node.js (v16 or later)
  • npm or yarn
  • MetaMask browser extension

Setup

  1. Clone the repository: ```bash git clone https://github.com/yourusername/somai-terminal.git cd somai-terminal ```

  2. Install dependencies: ```bash npm install

    or

    yarn install ```

  3. Create a .env.local file in the root directory with the following variables: ``` NEXT_PUBLIC_GEMINI_API_KEY=your_gemini_api_key ```

  4. Start the development server: ```bash npm run dev

    or

    yarn dev ```

  5. Open http://localhost:3000 in your browser to see the application.

Usage

Connecting to Somnia Testnet

  1. Install MetaMask if you haven't already
  2. Click "Connect Wallet" in the application header
  3. If you're not already on the Somnia Testnet, the application will prompt you to switch networks
  4. If the automatic network switch fails, go to the "Network" tab for manual configuration instructions

Chatting

  1. Navigate to the "Chat" tab
  2. Type your message in the input field at the bottom
  3. Press Enter or click the send button to send your message
  4. Your message will be signed with your wallet and stored on the blockchain
  5. Messages from other users will appear in the chat as they are sent

Creating Tokens

  1. Navigate to the "Chat" tab
  2. Use the command format: /create-token [name] [symbol] [initialSupply]
    • Example: /create-token MyToken MTK 1000000
  3. Sign the transaction with your wallet
  4. Once the transaction is confirmed, your token will be created on the blockchain
  5. View your created tokens in the "Tokens" tab

Viewing Network Information

  1. Navigate to the "Network" tab
  2. View detailed information about the Somnia Testnet
  3. Use the "Add to MetaMask" button to easily configure your wallet
  4. Copy network parameters as needed for manual configuration

Network Configuration

Somnia Testnet Details

  • Network Name: Somnia Testnet
  • RPC URL: https://rpc.ankr.com/somnia_testnet/6e3fd81558cf77b928b06b38e9409b4677b637118114e83364486294d5ff4811
  • Chain ID: 50312 (decimal) or 0xC498 (hex)
  • Currency Symbol: STT
  • Block Explorer: https://shannon-explorer.somnia.network/

Smart Contracts

The application interacts with two main smart contracts on the Somnia Testnet:

  1. Token Factory Contract: Allows users to create custom ERC-20 tokens

    • Address: 0x8Cb47d0148bD49EC5B74BE2C9E7149Dfe531c981
  2. Public Chat Contract: Stores and retrieves messages on the blockchain

    • Address: 0xC0898F0d62692086342c7D660f83b18B2ef22a6A

Future Improvements

  • End-to-End Encryption: Add encryption for private messaging
  • Token Trading: Implement a simple DEX for trading created tokens
  • Advanced AI Integration: Enhance AI capabilities with more context awareness
  • Multi-Network Support: Add support for additional blockchain networks
  • Message Threading: Implement threaded conversations
  • User Profiles: Add customizable user profiles with avatars
  • File Sharing: Enable sharing of files and images in the chat
  • Mobile App: Develop a native mobile application
  • Notifications: Add support for browser notifications for new messages
  • Theme Customization: Allow users to customize the terminal theme
  • Message Search: Implement full-text search for messages
  • Token Management: Add more token management features like transfers and allowances
  • Governance: Implement DAO-like governance for community decisions

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

  • Somnia Network for providing the testnet infrastructure
  • The ethers.js team for the excellent Ethereum library
  • The Next.js and React teams for the frontend framework
  • The shadcn/ui team for the UI components