@brunyee-studio/onus-cli 2.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "@brunyee-studio/onus-cli",
3
+ "version": "2.28.0",
4
+ "description": "Official CLI and TypeScript SDK for Onus issue tracking platform",
5
+ "keywords": [
6
+ "agent",
7
+ "cli",
8
+ "developer-tools",
9
+ "issue-tracker",
10
+ "onus"
11
+ ],
12
+ "license": "MIT",
13
+ "author": "Brunyee Studio",
14
+ "bin": {
15
+ "onus": "dist/bin.js"
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "skills",
20
+ "README.md"
21
+ ],
22
+ "type": "module",
23
+ "main": "./dist/index.js",
24
+ "types": "./dist/index.d.ts",
25
+ "exports": {
26
+ ".": {
27
+ "types": "./dist/index.d.ts",
28
+ "import": "./dist/index.js",
29
+ "default": "./dist/index.js"
30
+ },
31
+ "./package.json": "./package.json"
32
+ },
33
+ "publishConfig": {
34
+ "access": "public"
35
+ },
36
+ "scripts": {
37
+ "build": "tsup",
38
+ "dev": "tsup --watch",
39
+ "test": "vitest run",
40
+ "test:unit": "vitest run --exclude '**/bin.test.ts'",
41
+ "test:integration": "vitest run bin.test.ts",
42
+ "typecheck": "tsc --noEmit"
43
+ },
44
+ "dependencies": {
45
+ "commander": "^15.0.0",
46
+ "picocolors": "^1.1.1"
47
+ },
48
+ "devDependencies": {
49
+ "@types/node": "^24.13.3",
50
+ "tsup": "^8.4.0",
51
+ "typescript": "^5.9.3",
52
+ "vitest": "^5.0.1"
53
+ },
54
+ "engines": {
55
+ "node": ">=22.12.0"
56
+ }
57
+ }
@@ -0,0 +1,145 @@
1
+ ---
2
+ name: onus-cli
3
+ description: Work with Onus issue tracking through the onus CLI — authenticate, fetch teams/projects/issues, create and update issues, manage comments, labels, relations, and attachments. Use when the user asks to find, list, create, update, comment on, or organize Onus issues, projects, or teams.
4
+ ---
5
+
6
+ # Onus CLI
7
+
8
+ `onus` is the CLI for the Onus issue tracker. Always pass `--json` (or the global
9
+ `-j`) so output is machine-parseable JSON.
10
+
11
+ ## Auth
12
+
13
+ ```bash
14
+ onus auth login # interactive OAuth login (stores token)
15
+ onus auth status # check current auth state
16
+ ONUS_TOKEN=<token> onus me --json # or auth via env var (ONUS_TOKEN / ONUS_API_KEY)
17
+ onus --token <token> me --json # or per-invocation override
18
+ onus --api-url <url> … # custom API base URL
19
+ ```
20
+
21
+ ## Golden rules
22
+
23
+ - **Starting work on an issue: transition it to `in_progress` immediately.** As soon as you pick up an issue to implement it — before writing any code — run `onus issue update <ref> --status in_progress --json`. No update needed if `onus issue get <ref> --json` already shows the status is `in_progress` or `done`.
24
+ - Add `--json` to every command you intend to parse.
25
+ - Whenever referencing an Onus issue in any response, include its link: `https://onus.brunyeestudio.com/team/{TEAM}/issues/{NUM}` where `{TEAM}` is the team key (the tag before the dash in the ref, e.g. `ONUS`) and `{NUM}` is the issue number (the number after the dash). Example: for ref `ONUS-1`, `TEAM = ONUS`, `NUM = 1` → https://onus.brunyeestudio.com/team/ONUS/issues/1
26
+ - Exit codes: `0` success · `1` general error · `2` validation error · `3` auth error · `4` not found.
27
+ - Issue commands take a `<ref>` = human identifier (e.g. `ENG-42`) or UUID. Every `--team <team>` option accepts a team KEY (e.g. `ONUS`) or a team UUID — prefer the KEY, it's stable and readable.
28
+ - List results paginate (`onus issue list` only): pass `--cursor <cursor>` from the previous response.
29
+ - Not sure what fields exist? Run `onus schema <resource>` (issue, project, team, comment, label) or `onus context` for an auth/capability snapshot.
30
+
31
+ ## Discover resources
32
+
33
+ ```bash
34
+ onus me --json # authenticated viewer profile
35
+ onus team list --json # teams you can see
36
+ onus team get ONUS --json # by team KEY or UUID
37
+ onus project list --json # projects across teams
38
+ onus label list --json # workspace labels (for --label ids)
39
+ ```
40
+
41
+ ## Find issues
42
+
43
+ ```bash
44
+ onus issue list --json
45
+ onus issue list --team ONUS --status in_progress --json
46
+ onus issue list --assignee <userId> --project <projectId> --json
47
+ onus issue list --q "login bug" --limit 20 --json # free-text search
48
+ onus issue list --cursor <cursor> --json # next page
49
+ onus issue get ENG-42 --json # single issue by ref
50
+ ```
51
+
52
+ Status values: `backlog | todo | in_progress | done | canceled`.
53
+ Priority values: `none | urgent | high | medium | low`.
54
+
55
+ ## Project agent context
56
+
57
+ Issues may belong to a project. A project's `agent_context` is its owner's
58
+ standing instructions for AI agents working on that project or its issues
59
+ (e.g. "add debug logging to all new implementations") — treat it as required
60
+ reading alongside the issue itself.
61
+
62
+ - Issue has a `project_id`? Fetch the project first
63
+ (`onus project get <projectId> --json` → `.agent_context`) and follow it.
64
+ - Re-check `.agent_context` when moving an issue into/out of a project
65
+ (`issue create/update --project`).
66
+ - Editing a project (name, status, description, `agent_context`) is
67
+ permission-gated; never guess project UUIDs — `onus project list` first.
68
+ Set context from a file: `onus project update <id> --agent-context-file AGENTS.md`.
69
+
70
+ ## Create and update issues
71
+
72
+ ```bash
73
+ onus issue create --title "Fix login redirect" --team ONUS \
74
+ -d "Steps to reproduce: …" --status todo --priority high \
75
+ --assignee <userId> --parent <parentIssueId> --label <labelId> --json
76
+
77
+ onus issue update ENG-42 --status in_progress --priority urgent --json
78
+ onus issue update ENG-42 --title "New title" -d "Updated body" --add-label <labelId> --json
79
+ onus issue update ENG-42 --remove-label <labelId> --assignee <userId> --json
80
+ onus issue delete ENG-42 --yes # skip confirmation
81
+ ```
82
+
83
+ ## Comments
84
+
85
+ ```bash
86
+ onus comment list ENG-42 --json
87
+ onus comment create ENG-42 --body "Root cause identified, fix incoming." --json
88
+ onus issue comment edit ENG-42 --comment <commentId> --body "Corrected my earlier analysis." --json
89
+ onus issue comment delete ENG-42 --comment <commentId>
90
+ ```
91
+
92
+ (Top-level `comment` supports `list` and `create`; `issue comment` adds `edit`/`delete`.)
93
+
94
+ ## Analytics
95
+
96
+ ```bash
97
+ onus analytics overview --team ONUS --json
98
+ onus analytics overview --team ONUS \
99
+ --from 2026-09-06T00:00:00+00:00 --to 2026-09-07T23:59:59+00:00 --json
100
+ onus analytics events --team ONUS --limit 25 --json
101
+ onus analytics query --team ONUS --query '{"type":"trends","series":[{"event":"signup"}]}' --json
102
+ ```
103
+
104
+ ## Relations, attachments, subscriptions
105
+
106
+ ```bash
107
+ onus issue relation add ENG-42 --with ENG-43 --type blocks --json # types: blocks|duplicate|related|similar
108
+ onus issue attachment upload ENG-42 --file ./notes.md --json
109
+ onus issue attachment list ENG-42 --json
110
+ onus issue subscribe ENG-42 --json
111
+ onus issue link-pr ENG-42 --repo owner/repo --pr 42 --json # link a GitHub pull request
112
+ ```
113
+
114
+ ## Errors and ingest keys (DSN)
115
+
116
+ ```bash
117
+ onus dsn list --team ONUS --json # masked ingest keys for a team
118
+ onus dsn create --team ONUS --label ci # prints the full secret exactly once
119
+ ```
120
+
121
+ ## Pull requests and issues
122
+
123
+ Linking a PR to an issue means **the issue is auto-closed when the PR merges** —
124
+ there is no "related" link type. How links are created:
125
+
126
+ - **Auto-linking is GitHub-style.** The integration scans the PR title, body,
127
+ and branch name for `KEY-123` refs introduced by a closing keyword —
128
+ `Fixes` / `Closes` / `Resolves` (case-insensitive, optional colon, comma/
129
+ `and` lists). A plain prose mention of an issue ID does NOT link and never
130
+ auto-closes, so avoid writing bare issue IDs in PR text: use the issue's
131
+ name or its Onus URL instead.
132
+ - **Manual linking is deliberate.** `onus issue link-pr` creates a bot link
133
+ that survives body edits and closes on merge — use it when the PR fully
134
+ resolves an issue but its text has no closing keyword.
135
+ - **Only link PRs that actually fix/close the issue.** If a PR merely touches
136
+ related code, discusses the issue, or implements part of it without completing
137
+ it, do NOT link it (no keyword in the PR text, no `link-pr`). Use a relation
138
+ (`onus issue relation add … --type related`) or a comment mention instead.
139
+ - Never guess or assume: before linking, verify the PR's changes fully resolve
140
+ the issue (e.g. you implemented the fix in that PR, or the PR description
141
+ says "Fixes ONUS-42").
142
+ - Link at most once per PR per issue; don't spam links across partially-related
143
+ issues.
144
+
145
+ Run any command with `--help` for its exact flags — e.g. `onus issue relation add --help`.