Giter Site home page Giter Site logo

notion-cli-go's Introduction

Notion CLI Go

Notion CLI Go

Notion CLI Go is a command-line interface tool written in Go to manage tasks in Notion.so. This tool is a new iteration based on the original Python project, now built in Go for improved performance and portability. This project is a work in progress, some of the features mentioned below are aspirational and not yet implemented.

Installation

To install the project, you'll need to clone the repository and build the Go application. Here are the basic instructions:

git clone https://github.com/kris-hansen/notion-cli-go
cd notion-cli-go
go build
go install .

Configuration

Before running the notioncli tool, you need to set the following environment variables:

  • NOTION_API_KEY: Your Notion Official API key.
  • NOTION_PAGE_ID: The URL for the page (ex: https://notion.so/my-page/{pageID}). Here are some tips for finding your page ID. You will also need to share this page as an integration to expose it to the cli tool. Keep in mind that the page ID in the URL will have the title as Title-<PageID> and the title portion will need to be removed.
  • LOCAL_TIMEZONE: Your local timezone (ex: 'America/New_York').

For the NOTION_API_KEY, visit Notion's integration page and create a new integration. Remember to share your task page with the integration.

Your .env file can either be located in your working directory or in ~/.config/notioncli/.env - for convenience there is a sample env file named .env.example

Usage

You can interact with the tool using the built binary:

./notioncli [command]

Here are the available commands:

  • list: List all tasks on the Notion page.
  • add: Add a new task to the Notion page.
  • check: Mark a task as complete.
  • uncheck: Mark a task as incomplete.
  • delete: Delete a task from the Notion page.
  • completion: Generate the autocompletion script for your shell
  • help: Show help information.

Known Limitations

Currently, the tool only supports a single Notion page at a time and is focused on the ToDo use case.

Testing

Currently some of the utility package block functions have test coverage. Invoke the tests with:

go test -v ./...

License

This project is licensed under the Apache License 2.0. See the LICENSE file for details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.