{"slug": "from-curl-to-the-backlog-cli-bee-making-ai-agent-integration-one-step-easier", "title": "From curl to the Backlog CLI 'bee' — Making AI Agent Integration One Step Easier", "summary": "Nulab's volunteer-maintained open-source tool 'bee' provides a GitHub CLI-style interface for Backlog, reducing API key exposure and simplifying AI agent integration. The tool, requiring Node.js 20.18+, supports commands like 'bee issue list' and 'bee api', but its '--status' filter expects numeric IDs, not 'open'.", "body_md": "Last time, in [Issuing a Backlog API Key to Drive It from AI Agents](https://codenote.net/en/posts/backlog-api-key-for-ai-agents/), I walked through issuing a Backlog API key and letting Claude Code or Codex hit the REST API through curl. It works, but once you actually live with it, small frictions pile up:\n\n- Even if the API key sits in an environment variable, it still shows up as\n`apiKey=...`\n\nin the URL query, and that leaks into command history and shared scripts - The response is raw JSON, so before handing it to the agent I keep re-deciding whether to pipe it through\n`jq`\n\n- Common lookups like “my open issues” force me to reassemble the endpoint and query parameters every time\n\nA Nulab volunteer project has taken care of that abstraction layer: [bee](https://github.com/nulab/bee). This post is what I got out of putting it in front of my Backlog + AI-agent setup.\n\n## What bee Is\n\nIn one sentence, [bee](https://github.com/nulab/bee) is [GitHub CLI](https://cli.github.com/) (`gh`\n\n) for Backlog. It exposes Backlog’s core resources (projects, issues, wikis, notifications, the dashboard) through a `gh issue list`\n\n-style command surface.\n\nOne important caveat: bee is not an officially supported Nulab product. As the [README](https://github.com/nulab/bee) itself calls out, it is volunteer-maintained OSS ([MIT licensed](https://github.com/nulab/bee/blob/main/LICENSE)). That said, it is driven by Nulab folks, and it goes through the same [official Backlog REST API](https://developer.nulab.com/docs/backlog/) I described last time, so the auth story does not change. The previous conclusion, “run an agent-only Backlog user and issue an API key for it,” carries over directly onto bee.\n\n## Install and First-Time Auth\n\nbee ships as an npm package and requires [Node.js](https://nodejs.org/) 20.18 or later.\n\nFirst-run auth is per space. Both browser-based OAuth and the API key from the previous post work; for agent use, the API key path is usually the easier fit.\n\nIf you juggle multiple Backlog spaces, `bee auth switch`\n\nflips the active one. Once auth is in place, every other subcommand picks up the credentials implicitly.\n\n## How bee Changes the Agent Story\n\nThe biggest shift versus raw curl is that the API key stops showing up on the command line. bee’s credentials live in a local config file, so any shell command handed to Claude Code or Codex no longer needs `apiKey=xxx`\n\nin it. The structural risk of an API key leaking into an agent prompt or shell history drops sharply.\n\nThe second shift is output handling. The default output is human-readable, but most subcommands accept `--json`\n\nand return machine-readable JSON. Even if you still let the agent parse the output, the shape is far more stable than hand-rolled REST.\n\nFor the times you still want raw REST (poking at a newer Backlog endpoint, say), `bee api <endpoint>`\n\nlets you hit any endpoint while reusing the stored credentials. Safer than a fresh curl one-liner, and shorter.\n\n## Common Use Cases\n\nThe subcommands listed by `bee --help`\n\n(`auth`\n\n, `project`\n\n, `issue`\n\n, `document`\n\n, `notification`\n\n, `pr`\n\n, `repo`\n\n, `team`\n\n, `user`\n\n, `wiki`\n\n, `category`\n\n, `milestone`\n\n, `issue-type`\n\n, `space`\n\n, `status`\n\n, `star`\n\n, `watching`\n\n, `dashboard`\n\n, `browse`\n\n, `api`\n\n, `completion`\n\n) map almost one-to-one onto Backlog’s resources. The operations you actually want an agent to do usually fall inside that list.\n\nFor a “what is on my plate” glance across notifications and issues, one line is enough:\n\nTo inspect a single issue, pass the Backlog issue key directly:\n\nCreating an issue or leaving a comment reads much like `gh issue create`\n\n:\n\nWiki reads stay in the terminal too:\n\n## The Gotcha: `--status open`\n\nDoes Not Work\n\nWith all that said, the first thing I tripped over in production was `bee issue list`\n\n’s status filter. GitHub-CLI reflexes make you want to write:\n\nThat does not work. bee’s `--status`\n\nexpects a numeric status ID, so passing `\"open\"`\n\nfails with `Invalid type: Expected number but received NaN`\n\n.\n\nBacklog’s built-in statuses are `1 = Open`\n\n, `2 = In Progress`\n\n, `3 = Resolved`\n\n, `4 = Closed`\n\n. To get the equivalent of “open” (unfinished issues), pass `-S`\n\n(status ID) multiple times:\n\n`-a @me`\n\nis a nice CLI-only shorthand for “issues assigned to me.” Projects can define custom statuses outside the standard four, so it is worth pinning down the IDs beforehand:\n\nWatch the letter casing too. `-S`\n\nis status ID and `-a`\n\nis assignee, which diverges slightly from [the gh conventions](https://cli.github.com/manual/). If you plan to store agent prompts or snippets, templating this makes future you happier.\n\n## Wrap-Up\n\nDriving Backlog from AI agents already works on the “agent-only user + API key” approach from the previous post. Layering [bee](https://github.com/nulab/bee) on top of that keeps the API key off the command line, gives you structured output, and still lets you drop down to raw REST via `bee api`\n\nwhen you need to.\n\nbee is volunteer-maintained OSS from Nulab, not an officially supported product, so it should not be treated with the same expectations as a paid tool. But as a CLI it is polished, and it takes one clear step of friction out of AI-agent-driven Backlog operations. For now my baseline setup is “dedicated agent user + bee,” and I will keep an eye on both bee and Backlog’s own API-key implementation as they mature.\n\nThat’s all from moving off raw curl onto the Backlog CLI ‘bee’ and making AI agent integration one step easier, from the Gemba.", "url": "https://wpnews.pro/news/from-curl-to-the-backlog-cli-bee-making-ai-agent-integration-one-step-easier", "canonical_source": "https://codenote.net/en/posts/backlog-cli-bee-for-ai-agents/", "published_at": "2026-08-04 14:43:59+00:00", "updated_at": "2026-08-09 13:08:11.994668+00:00", "lang": "en", "topics": ["developer-tools", "ai-agents"], "entities": ["Nulab", "Backlog", "bee", "GitHub CLI", "Claude Code", "Codex", "Node.js"], "alternates": {"html": "https://wpnews.pro/news/from-curl-to-the-backlog-cli-bee-making-ai-agent-integration-one-step-easier", "markdown": "https://wpnews.pro/news/from-curl-to-the-backlog-cli-bee-making-ai-agent-integration-one-step-easier.md", "text": "https://wpnews.pro/news/from-curl-to-the-backlog-cli-bee-making-ai-agent-integration-one-step-easier.txt", "jsonld": "https://wpnews.pro/news/from-curl-to-the-backlog-cli-bee-making-ai-agent-integration-one-step-easier.jsonld"}}