Command Palette
Search for a command to run...

Manage posts, brand identities, integrations, and schedules from the terminal.

reference · intermediate · 12m
s'applique à notra, notra-cli
par Dominik K. · · draft

The Notra CLI gives you scriptable access to your workspace when installed. This repository currently does not include a CLI package, so treat these commands as the intended public CLI interface rather than local monorepo commands.

Install

bun add -g notra
npm install -g notra
pnpm add -g notra
yarn global add notra

You can also run any command without installing using bunx notra <command> or npx notra <command>.

Verify the install:

notra --version

Authentication

The CLI authenticates with a Notra API key. You have three options.

Browser-based login

notra auth login

This opens the dashboard, has you confirm the new key, and writes it to local config.

Tip

Use notra auth login --no-browser on a remote machine to print the URL instead of opening a browser.

Paste an existing key

notra init

Prompts for your API key interactively, or pass it directly:

notra init --api-key ntra_xxxxxxxxxxxxxxxxxxxxxx

Per-command override

Skip stored config entirely with the NOTRA_API_KEY env var or a --api-key flag:

NOTRA_API_KEY=ntra_xxx notra posts listnotra posts list --api-key ntra_xxx

Manage keys yourself in Developer → API Keys in the dashboard. See Authentication for details.

Configuration

Local config lives at ~/Library/Preferences/notra-cli-nodejs/config.json (macOS) or the platform equivalent.

notra config pathnotra config getnotra config get api-keynotra config set base-url https://api.usenotra.comnotra config set api-key ntra_xxx

Sign out to remove the stored key:

notra auth logout

Quickstart

notra auth loginnotra integrations github --owner usenotra --repo notranotra brands generate --website-url https://usenotra.com --waitnotra posts generate --content-type changelog --lookback last_7_days --waitnotra posts list --status draft --limit 10

Posts

Manage generated content.

Command Description
notra posts list List posts in the current organization
notra posts get <postId> Fetch a single post
notra posts generate Queue an async post-generation job
notra posts status <jobId> Read the status of a generation job
notra posts update <postId> Update title, slug, markdown, or status
notra posts delete <postId> Delete a post

List with filters

notra posts list --status draft --limit 10notra posts list --content-type changelog,blog_post --sort descnotra posts list --brand brand_abc --json

Read a post

notra posts get post_abc123notra posts get post_abc123 --markdown > post.md

Generate content

notra posts generate \  --content-type changelog \  --brand brand_abc \  --github-integration integration_xyz \  --lookback last_7_days \  --wait

--wait polls until the job finishes. Drop it to return the jobId immediately and check later with notra posts status <jobId> --watch.

Update content

notra posts update post_abc123 --title "New title" --status publishednotra posts update post_abc123 --markdown-file ./post.mdcat post.md | notra posts update post_abc123 --markdown-file -

Delete

notra posts delete post_abc123 --yes

Brand identities

Manage brand identities and run brand-identity generation jobs.

Command Description
notra brands list List brand identities
notra brands get <brandId> Fetch a single brand identity
notra brands generate Queue an async brand-identity generation from a website URL
notra brands status <jobId> Read the status of a brand-identity generation job
notra brands update <brandId> Update name, tone, instructions, or default flag
notra brands delete <brandId> Delete a non-default brand identity

Generate from a website

notra brands generate --website-url https://acme.com --name Acme --wait

Update settings

notra brands update brand_abc --tone Professionalnotra brands update brand_abc --custom-instructions "Always include PR links"notra brands update brand_abc --default

Tone options: Conversational, Professional, Casual, Formal.

Integrations

Connect GitHub repositories and manage existing Linear integrations. Slack is planned.

Command Description
notra integrations list List GitHub and Linear integrations
notra integrations github Connect a GitHub repository
notra integrations remove <integrationId> Disconnect a GitHub or Linear integration

Connect a repository

notra integrations github --owner usenotra --repo notranotra integrations github --owner acme --repo website --branch developnotra integrations github --owner acme --repo private-app --token ghp_xxx

A token is only required for private repos without an installed GitHub App.

Schedules

Manage cron-based content-generation schedules.

Command Description
notra schedules list List schedules
notra schedules create Create a new schedule
notra schedules update <scheduleId> Replace a schedule (PATCH semantics)
notra schedules delete <scheduleId> Delete a schedule

Create a schedule

notra schedules create \  --name "Daily changelog" \  --frequency daily --hour 9 --minute 0 \  --output-type changelog \  --repository repo_abc \  --lookback yesterday \  --enabled

For weekly/monthly schedules, pass --day-of-week (0-6) or --day-of-month (1-31).

From a JSON file

notra schedules create --config-file ./schedule.jsoncat schedule.json | notra schedules create --config-file -

Global flags

These work on every command:

Flag Description
--json Print machine-readable JSON instead of a formatted table
--api-key <value> Override the configured key (or NOTRA_API_KEY env var)
--base-url <value> Override the API base URL (or NOTRA_BASE_URL env var)
Tip

Pipe --json output through jq for scripting:

notra posts list --status draft --json | jq -r '.posts[].id'

Source

The CLI is open source and lives alongside the rest of Notra. See the Notra GitHub repository for the source and to report issues.

Ça a marché sur votre configuration ?

Pas encore évalué