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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dayone/cli

v0.19.3

Published

Day One CLI

Readme

Day One CLI

Command-line access to your Day One account, journals, entries, daily chat, and context items.

The CLI is designed for scriptable workflows and machine-readable output (JSON-first).

Prerequisites

  • Node.js LTS installed (node --version, npm --version)
  • A Day One account with valid credentials
  • Network access to Day One API endpoints

Installation

Install via npm:

npm install -g @dayone/cli

Confirm install:

dayone --help

Upgrading from the old Day One CLI

If you are upgrading from the old Day One CLI, remove the legacy binary first:

sudo rm /usr/local/bin/dayone

AI Agent Skills (Optional)

This repository ships a single agent skill at skills/dayone-cli/ for AI agent integrations like Claude Code, Cursor, and similar. The top-level SKILL.md is the entry point, with per-command-group references under skills/dayone-cli/references/.

Install:

npx skills add bloom/dayone-cli-skills

Quick Start

  1. Run guided setup:
dayone setup

Setup also asks whether to set an encryption key now; you can skip and run dayone auth key-set later.

  1. Or run login only:
dayone auth login --email [email protected]

Password from stdin:

# Prompt for password without echo; it will not be stored in shell history
read -s -p 'Day One password: ' DAYONE_PASSWORD && printf '%s' "$DAYONE_PASSWORD" | dayone auth login --email [email protected] --password-stdin
unset DAYONE_PASSWORD
  1. Verify current identity and token:
dayone auth whoami
dayone user-settings get
  1. Sync remote data locally:
dayone sync
  1. Start using data:
dayone list journals
dayone list entries --journal-id <journal-id> --limit 20
dayone list entries --journal-id <journal-id> --limit 20 --offset 20
dayone list entries --journal-id <journal-id> --fields id,date,tags,body
dayone list entries --journal-id <journal-id> --sort-method editDate

Common Commands

Entries

Write an entry:

dayone entry write --journal-id <journal-id> --body "My new entry"

Write an all-day entry (time ignored on display):

dayone entry write --journal-id <journal-id> --date 2026-03-31T09:30:00Z --all-day --body "Daily summary"

Write an entry with attachments (repeat --attach):

dayone entry write --journal-id <journal-id> --body "Trip notes" --attach /path/to/photo.jpg --attach /path/to/itinerary.pdf

Place media inline with Day One Web placeholders:

dayone entry write --journal-id <journal-id> --body $'Trip notes\n\n![](dayone-moment://)\n\nMore notes' --attach /path/to/photo.jpg

Use existing moment IDs directly:

dayone entry write --journal-id <journal-id> --body $'Look back\n\n![](dayone-moment://AFC7155130AF46E497A7C8D1C70D7731)'

Optionally pin attachment types explicitly:

dayone entry write --journal-id <journal-id> --body "Voice memo" --attach /path/to/memo.m4a --attach-type audio

Write from stdin:

printf '%s' 'My new entry from stdin' | dayone entry write --journal-id <journal-id> --body-stdin

Soft-delete an entry (requires both journal and entry ids):

dayone entry delete --journal-id <journal-id> --entry-id <entry-id>

List entries with projected fields (smaller JSON payloads):

dayone list entries --journal-id <journal-id> --fields id,date,tags,body

--fields accepts a comma-separated list of top-level entry keys. When omitted, full entry objects are returned. Missing keys are returned as null.

--sort-method accepts entryDate or editDate. When omitted, the command follows the journal's sort_method (defaulting to entryDate if unavailable). For cursor pagination, reuse the same --sort and --sort-method values between pages; changing either can skip or duplicate entries.

Paginate entries with offset mode:

dayone list entries --journal-id <journal-id> --limit 20 --offset 40

Paginate entries with cursor mode (opaque cursor token):

dayone list entries --journal-id <journal-id> --limit 20
# copy `next_cursor` from JSON output
dayone list entries --journal-id <journal-id> --limit 20 --cursor "<next_cursor>"

Journals

Create a journal from flags:

dayone journal create --name "CLI Journal" --color "#2f5d62" --conceal true

Create from JSON:

dayone journal create --json '{"name":"JSON Journal","color":"#5f4b8b","hide_all_entries":true}'

Create a shared journal (shared journals must be end-to-end encrypted):

dayone journal create --name "Shared Space" --shared --e2e

Shared journals require end-to-end encrypted data. The --e2e flag is one way to have the CLI generate that encrypted payload; if you provide an already-encrypted JSON payload, --shared can also be used without --e2e. Using --e2e requires dayone auth key-set and a prior dayone sync so the CLI has your encryption key and synced user key material.

Daily Chat

List daily chats:

dayone list daily-chat

Append a message:

dayone daily-chat add --message "Today I shipped a feature"

Context Items

List synced context items:

dayone list context-items

Search context items:

dayone search context-items --query "playing tennis" --limit 20

Encryption Key (for decrypt-enabled sync resources)

Shortcut during onboarding (login + key set):

dayone setup

Set key interactively:

dayone auth key-set

Set key from stdin:

printf '%s' 'your-encryption-key' | dayone auth key-set --key-stdin

Updating the encryption key resets stored sync cursors so the next sync re-pulls resources from the beginning.

Configuration

Default config path uses your OS config directory (for example, ~/.config/dayone-cli on many systems).

Override config directory:

DAYONE_CONFIG_DIR=/path/to/config dayone user-settings get

Shared secrets file (CLI)

On startup, before parsing arguments, the CLI loads KEY=value lines from ~/.config/dayone/secrets-cli when that file exists (dotenv format, via the dotenvy crate). Values already set in the process environment are left unchanged, so explicit export / CI secrets take precedence. Use this for local CLI-only variables such as DAYONE_API_HOST without checking them into the repo.

Output and Notes

  • Command output is structured JSON.
  • sync progress logs are written to stderr with [sync] prefixes.
  • Auth/session data is persisted locally in SQLite.
  • Encryption master keys are stored in the system keychain when available (with automatic SQLite fallback for headless/CI environments).
  • Attachment uploads are local-first: entry write queues metadata and originals; sync uploads entry metadata first, then original binaries.
  • Attachment constraints: max 500MB per file, with supported families image/video/audio/pdf.
  • Linux installs include both standard and -no-embeddings platform packages for the matching architecture; the launcher picks based on glibc version (>= 2.38 prefers standard, otherwise it uses -no-embeddings). Compatibility -no-embeddings packages are built on Ubuntu 22.04 (glibc 2.35).

License

GNU GPL v3 (GPL-3.0-only). See LICENSE.