CLI
Manage posts, brand identities, integrations, and schedules from the terminal.
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 notranpm install -g notrapnpm add -g notrayarn global add notraYou can also run any command without installing using bunx notra <command> or npx notra <command>.
Verify the install:
notra --versionAuthentication
The CLI authenticates with a Notra API key. You have three options.
Browser-based login
notra auth loginThis opens the dashboard, has you confirm the new key, and writes it to local config.
Use notra auth login --no-browser on a remote machine to print the URL instead of opening a browser.
Paste an existing key
notra initPrompts for your API key interactively, or pass it directly:
notra init --api-key ntra_xxxxxxxxxxxxxxxxxxxxxxPer-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_xxxManage 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_xxxSign out to remove the stored key:
notra auth logoutQuickstart
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 10Posts
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 --jsonRead a post
notra posts get post_abc123notra posts get post_abc123 --markdown > post.mdGenerate 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 --yesBrand 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 --waitUpdate settings
notra brands update brand_abc --tone Professionalnotra brands update brand_abc --custom-instructions "Always include PR links"notra brands update brand_abc --defaultTone 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_xxxA 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 \ --enabledFor 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) |
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.
Hat das auf deinem Setup funktioniert?
Noch nicht bewertet