cd /news/ai-tools/how-to-setup-bee-cli-beeai-cli-on-yo… · home › topics › ai-tools › article
[ARTICLE · art-178909] src=dev.to ↗ pub= topic=ai-tools verified=true sentiment=↑ positive

How to setup Bee CLI (@beeai/cli) on your Ubuntu 24.04

A developer documented setting up Bee's command-line interface (@beeai/cli) on Ubuntu 24.04, installing it via npm or mise and wiring it to GNOME Keyring through the Secret Service D-Bus API so the CLI can store credentials. The setup includes a user-level systemd keyring service, enabling lingering, and authenticating with `bee login --qr`, after which conversation data can be pulled from the terminal with commands like `bee conversations list` and `bee conversations get <ID> --json` for use in other tools, including AI harnesses.

recommendation

Run GNOME Keyring as a user systemd service with lingering enabled so the Secret Service stays available for CLI credential storage, and restrict permissions on the password file it reads.

more in playbook: Running AI in production
by read3 min views3 publishedNov 30, 2026

After attending an AWS re:Invent session(AMZ202-R) about Bee, I became very interested in it as a note-taking product that I could use through a CLI.

Bee is a wearable note-taking device and service that records conversations and makes them available in the Bee app. Bee also provides a command-line interface, @beeai/cli, for accessing that data from a terminal. That makes it possible to bring Bee conversations into other tools—including AI harnesses.

Here’s how I set up Bee CLI on Ubuntu 24.04.

Install the CLI with npm:

npm install -g @beeai/cli

Or use mise:

mise use -g npm:@beeai/cli

The CLI needs access to a Secret Service keyring to store credentials. On Ubuntu, I used GNOME Keyring.

Install GNOME Keyring and the command-line tools for Secret Service:

sudo apt install -y gnome-keyring libsecret-tools

Start a temporary D-Bus session:

dbus-run-session -- bash

Inside that shell, unlock GNOME Keyring. Replace the example with your own keyring password; don’t use the example value below:

 PW='your-keyring-password' # 1st letter space is avoiding history
printf '%s' "$PW" | gnome-keyring-daemon --unlock --components=secrets
unset PW

Store a test value and retrieve it:

printf '%s' 'test-value' | secret-tool store --label='Test' app keyring-test
secret-tool lookup app keyring-test

The lookup should print:

test-value

I also checked that the keyring files had been created:

ls ~/.local/share/keyrings/

Then exit the temporary D-Bus session:

exit

After logging in again, connect to the user D-Bus and unlock GNOME Keyring:

export DBUS_SESSION_BUS_ADDRESS="unix:path=$XDG_RUNTIME_DIR/bus"

 PW='your-keyring-password' # 1st letter space is avoiding history
printf '%s' "$PW" | gnome-keyring-daemon --foreground --unlock --components=secrets &
unset PW

Confirm that the Secret Service login collection is available:

busctl --user tree org.freedesktop.secrets | grep /login$

I saw this path in the output:

/org/freedesktop/secrets/collection/login

To start GNOME Keyring as a user systemd service, create keyring.service:

cat << '_EOT_' | SYSTEMD_EDITOR=tee systemctl --user edit --full --force keyring.service
[Unit]
Description=GNOME Keyring Secret Service
Requires=dbus.socket
After=dbus.socket

[Service]
Type=dbus
BusName=org.freedesktop.secrets
Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=%t/bus
ExecStart=/usr/bin/gnome-keyring-daemon --foreground --unlock --components=secrets
StandardInput=file:%h/.config/gnome-keyring/password
Restart=on-failure

[Install]
WantedBy=default.target
_EOT_

This service reads the keyring password from ~/.config/gnome-keyring/password. That file contains a secret, so keep it private and restrict access to it.

Stop any already-running keyring daemon, then enable and start the service:

pkill -u "$(id -u)" -x gnome-keyring-d || true
systemctl --user enable --now keyring.service

Test Secret Service again:

secret-tool lookup app keyring-test

The expected output is still:

test-value

To keep user services running when you’re not logged in, enable lingering and reboot:

sudo loginctl enable-linger "$USER"
sudo systemctl reboot

After the reboot, log in to Bee:

bee login --qr

Check that the CLI can access your profile:

bee me

My profile output included my timezone and name. bee status is also available to check the CLI’s authentication status.

Bee CLI can retrieve conversation data from the terminal. For example:

bee conversations list
bee conversations get <CONVERSATION_ID> --json

I’ll add a screenshot here showing the CLI being called from an AI harness.

[Screenshot: AI harness calling Bee CLI]

This setup gives Bee CLI access to GNOME Keyring through Ubuntu’s Secret Service, and makes Bee conversation data available to other command-line tools.

── more in #ai-tools 4 stories · sorted by recency
── more on @bee 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/how-to-setup-bee-cli…] indexed:0 read:3min 2026-11-30 · —