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 🙏

© 2024 – Pkg Stats / Ryan Hefner

notion-assesment

v1.0.1

Published

Simple mail app supported by Notion as a command line interface (CLI).

Downloads

3

Readme

NotionMail CLI

NotionMail is a command-line interface (CLI) tool designed to emulate the reading and writing of emails using the Notion API. The core functionality revolves around sending messages to a specified recipient and reading messages for a given recipient from a Notion database. This tool is enhanced with several additional features, particularly focusing on AI integration and improving the user experience.

Features

Core Functionality

  • Send Messages: Allows users to send messages to a designated recipient as a specified sender. This action writes the message directly to the Notion database using the Notion API.
  • Read Messages: Enables users to read messages for a specified recipient. This action retrieves the messages from the Notion database using the Notion API.

Additional Improvements

  • AI-Generated Mailing: Users can generate emails using AI based on different tones (Professional, Casual, Formal). This feature enhances the flexibility and creativity in drafting messages, particularly useful for users who want to quickly generate content.
  • Message Sorting by Priority: When reading messages, users can choose to have them sorted by AI-determined priority (High, Medium, Low). This allows users to focus on the most important messages first.
  • AI Summarization: Provides a quick overview of all messages for a recipient by generating an AI-powered summary. This feature is particularly useful when dealing with a large volume of messages (or long messages).
  • Timestamps: Each message includes a timestamp indicating when it was sent, adding a layer of context and organization.
  • User-Friendly Interface: The CLI features an interactive and visually appealing interface using chalk and chalk-animation, making the user experience more engaging.

Installation and Setup

Prerequisites

  • Node.js (v14 or higher)
  • npm (v6 or higher)
  • Notion API credentials (Integration Token and Database ID)

Installation

  1. Clone the repository or install the package from npm:

    npm i notion-assesment
  2. Set up your environment variables:

    export NOTION_KEY=<Your Notion Integration Token>
    export NOTION_PAGE_ID=<Your Notion Database ID>
    export OPENAI_API_KEY=<Your OpenAI API Key>

Running the Program

  1. Start the CLI by running:

    notionmail
  2. Follow the on-screen prompts to send or read mails.

Dependencies

  • @inquirer/prompts: For interactive command-line prompts.
  • chalk: For styling terminal output.
  • chalk-animation: For adding animations to terminal output.
  • dotenv: For managing environment variables.
  • @notionhq/client: Official Notion API client for Node.js.
  • openai: For AI-generated content and summarization.

References

Future Improvements

  1. Message Deletion: Implement functionality to allow users to delete messages directly from the Notion database.
  2. Enhanced AI Features: Further refine AI-generated messages by adding more customizable tones or templates.
  3. Custom Notion Views: Allow users to interact with different views or filters in the Notion database, providing more flexibility in how messages are displayed.
  4. Multi-Language Support: Expand the program to support multiple languages for both the user interface and AI-generated content.

Product and Technical Choices

AI Integration

The decision to integrate AI into the NotionMail CLI was driven by the goal to enhance user productivity and creativity. By allowing users to generate messages and summaries using AI, the tool provides value beyond simple message handling, making it more versatile for various use cases.

User Interface

The choice to use chalk and chalk-animation was made to ensure that the CLI is not only functional but also enjoyable to use. A visually appealing interface helps in making the user experience more engaging, which is crucial for a CLI tool that may otherwise seem dry or complex.

Use of Promises and Async/Await

Given the asynchronous nature of API calls, especially when dealing with external services like Notion and OpenAI, the use of async/await was critical. It allows for more readable and maintainable code, especially in handling multiple steps within a single function, such as sending or reading mails.


Feel free to adjust any part of the README to better reflect your work or style. This draft aims to capture the essence of your project and the choices you've made.