@NotionDevs: Install ntn, the Notion CLI. It brings the entire Notion API to your terminal, plus everything you need to build and de…

X AI KOLs Timeline Tools

Summary

ntn is a Notion CLI that brings the full Notion API to the terminal and supports building and deploying Workers. Install via curl/wget.

Install ntn, the Notion CLI. It brings the entire Notion API to your terminal, plus everything you need to build and deploy Workers. Built for humans and coding agents alike. Install with: curl -fsSL https://t.co/2dJqE3YHvw | bash https://t.co/X4Cr4c9GXg
Original Article
View Cached Full Text

Cached at: 05/14/26, 06:31 AM

Install ntn, the Notion CLI.

It brings the entire Notion API to your terminal, plus everything you need to build and deploy Workers. Built for humans and coding agents alike.

Install with: curl -fsSL https://t.co/2dJqE3YHvw | bash https://t.co/X4Cr4c9GXg


Source: https://ntn.dev/ #!/usr/bin/env bash set -euo pipefail readonly BASE_URL=“\{NTN\_BASE\_URL:\-https://ntn\.dev\}" readonly INSTALL\_DIR="{NTN_INSTALL_DIR:-/usr/local/bin}” readonly REQUESTED_VERSION=“\{NTN\_VERSION:\-latest\}" if \[\[ "{REQUESTED_VERSION}” != “latest” && ! “\{REQUESTED\_VERSION\}" =~ ^v?\[0\-9\]\+\\\.\[0\-9\]\+\\\.\[0\-9\]\+\(\-\[a\-zA\-Z0\-9\.\]\+\)? ]]; then printf ‘error: invalid version “%s” -- expected “latest” or a semver like “1.2.3” or “v1.2.3”\n’ “\{REQUESTED\_VERSION\}" \>&2 exit 1 fi function info\(\) \{ printf '==\> %s\\n' "*” >&2 } function fail() { printf ‘error: %s\n’ “\*" \>&2 exit 1 \} function require\_command\(\) \{ local command\_name="1” command -v “$command_name” >/dev/null 2>&1 || fail “Missing required command: \{command\_name\}" \} function detect\_downloader\(\) \{ if command \-v curl \>/dev/null 2\>&1; then DOWNLOADER="curl" elif command \-v wget \>/dev/null 2\>&1; then DOWNLOADER="wget" else fail "Either curl or wget is required but neither is installed" fi \} function download\(\) \{ local url="1” local output=“\{2:\-\}" if \[\[ "{DOWNLOADER}” == “curl” ]]; then if [[ -n “\{output\}" \]\]; then curl \-fsSL \-o "{output}” “\{url\}" else curl \-fsSL "{url}” fi else if [[ -n “\{output\}" \]\]; then wget \-q \-O "{output}” “\{url\}" else wget \-q \-O \- "{url}” fi fi } function detect_target() { local os local arch os=“\(uname \-s\)" arch="(uname -m)” # Detect Rosetta 2: if running as x86_64 under Rosetta on an ARM Mac, # use the native arm64 binary instead. if [[ “\{os\}" == "Darwin" && "{arch}” == “x86_64” ]]; then if [[ “\(sysctl \-n sysctl\.proc\_translated 2\>/dev/null\)" == "1" \]\]; then arch="arm64" fi fi case "{os}” in MINGW* | MSYS* | CYGWIN*) fail “ntn does not currently support Windows” ;; esac case “\{os\}:{arch}” in Darwin:arm64 | Darwin:aarch64) NTN_TARGET=“aarch64-apple-darwin” NTN_PLATFORM_LABEL=“darwin-arm64” ;; Darwin:x86_64) NTN_TARGET=“x86_64-apple-darwin” NTN_PLATFORM_LABEL=“darwin-x64” ;; Linux:x86_64) NTN_TARGET=“x86_64-unknown-linux-musl” NTN_PLATFORM_LABEL=“linux-x64” ;; Linux:arm64 | Linux:aarch64) NTN_TARGET=“aarch64-unknown-linux-musl” NTN_PLATFORM_LABEL=“linux-arm64” ;; *) fail “ntn does not support ${os} \{arch\}" ;; esac \} function normalize\_version\(\) \{ local version="1” if [[ “\{version\}" == v\* \]\]; then printf '%s\\n' "{version}” else printf ‘v%s\n’ “\{version\}" fi \} function resolve\_version\(\) \{ if \[\[ "{REQUESTED_VERSION}” == “latest” ]]; then download “\{BASE\_URL\}/latest\.txt" \| tr \-d '\[:space:\]' else normalize\_version "{REQUESTED_VERSION}” fi } function verify_archive() { local archive_dir=“1" local archive\_name="2” local checksum_name=“3" if command \-v shasum \>/dev/null 2\>&1; then \(cd "{archive_dir}” && shasum -a 256 -c “\{checksum\_name\}"\) \|\| fail "Checksum verification failed" return fi if command \-v sha256sum \>/dev/null 2\>&1; then \(cd "{archive_dir}” && sha256sum -c “\{checksum\_name\}"\) \|\| fail "Checksum verification failed" return fi fail "No checksum tool found \(need shasum or sha256sum\)" \} function install\_binary\(\) \{ local binary\_path="1” local destination_path=“\{INSTALL\_DIR\}/ntn" if mkdir \-p "{INSTALL_DIR}” 2>/dev/null && install -m 0755 “\{binary\_path\}" "{destination_path}” 2>/dev/null; then return fi command -v sudo >/dev/null 2>&1 || fail “Cannot write to \{INSTALL\_DIR\}; re\-run with sudo or set NTN\_INSTALL\_DIR" sudo mkdir \-p "{INSTALL_DIR}” sudo install -m 0755 “\{binary\_path\}" "{destination_path}” } detect_downloader require_command tar require_command uname require_command mktemp require_command install detect_target VERSION=“\(resolve\_version\)" \|\| true readonly VERSION \[\[ \-n "{VERSION}” ]] || fail “Could not resolve version (check network connectivity or NTN_BASE_URL)” readonly ARCHIVE_NAME=“ntn-\{NTN\_TARGET\}\.tar\.gz" readonly ARCHIVE\_URL="{BASE_URL}/releases/\{VERSION\}/{ARCHIVE_NAME}” readonly CHECKSUM_URL=“\{ARCHIVE\_URL\}\.sha256" TMP\_DIR="(mktemp -d)” readonly TMP_DIR trap ’rm -rf “\{TMP\_DIR\}"' EXIT ARCHIVE\_PATH="{TMP_DIR}/\{ARCHIVE\_NAME\}" readonly ARCHIVE\_PATH CHECKSUM\_PATH="{TMP_DIR}/${ARCHIVE_NAME}.sha256” readonly CHECKSUM_PATH info “Downloading ${VERSION} for \{NTN\_PLATFORM\_LABEL\}" if \! download "{ARCHIVE_URL}” “\{ARCHIVE\_PATH\}"; then rm \-f "{ARCHIVE_PATH}” fail “Failed to download \{ARCHIVE\_URL\}" fi if \! download "{CHECKSUM_URL}” “\{CHECKSUM\_PATH\}"; then rm \-f "{CHECKSUM_PATH}” fail “Failed to download checksum file from \{CHECKSUM\_URL\}" fi verify\_archive "{TMP_DIR}” “\{ARCHIVE\_NAME\}" "(basename “\{CHECKSUM\_PATH\}"\)" tar \-xzf "{ARCHIVE_PATH}” -C “\{TMP\_DIR\}" BINARY\_PATH="{TMP_DIR}/ntn-\{NTN\_TARGET\}/ntn" readonly BINARY\_PATH \[\[ \-f "{BINARY_PATH}” ]] || fail “Downloaded archive did not contain an ntn binary” install_binary “\{BINARY\_PATH\}" cat \>&2 <<'BANNER' ▄▄▄▄▄▄▄▄▖ ██▄▄▄▄▄▄▄▟▙▖ ███ ▄▄ ▄▄▐▌ ███ ▐█▙ ▐▌▐▌ ███ ▐▌▜▙▐▌▐▌ ███ ▟▙ ▀█▌▐▌ ▀█▄▄▄▄▄▄▄▞▘ BANNER printf ' Notion CLI \(Beta\)\\n\\n' \>&2 printf ' Installed ntn %s to %s/ntn\\n\\n' "{VERSION}” “${INSTALL_DIR}” >&2 cat >&2 <<‘NEXT’ Get started: ntn login Log in to your Notion workspace ntn workers new Create a new worker ntn datasources query Query a data source ntn pages create Create a page from Markdown ntn api Call the Notion API directly ntn --help See all available commands Add the Notion skill for your agents: npx skills add makenotion/skills NEXT

Similar Articles

Notion Developer Platform

Product Hunt

Notion launches a developer platform that lets users build on top of Notion, extending its functionality beyond the core app.

@jakevin7: Notion officially released CLI! OpenCLI integrated immediately. Now you can let Agent directly operate Notion—not just calling API, but real client-level control. A few scenarios you can use right away: Use opencli web read to extract content from any webpage…

X AI KOLs Following

Notion officially released a CLI tool, and OpenCLI integrated it immediately, allowing users to directly operate Notion via command line and AI agents, enabling cross-platform content sync and automation.