@oculisecurity/cli 0.1.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/LICENSE.txt +201 -0
- package/README.md +67 -0
- package/dist/cli.d.ts +18 -0
- package/dist/cli.js +565 -0
- package/dist/commands/init.d.ts +14 -0
- package/dist/commands/init.js +135 -0
- package/dist/commands/report.d.ts +33 -0
- package/dist/commands/report.js +145 -0
- package/dist/commands/serve.d.ts +27 -0
- package/dist/commands/serve.js +163 -0
- package/dist/commands/tail.d.ts +7 -0
- package/dist/commands/tail.js +211 -0
- package/dist/commands/uninstall.d.ts +13 -0
- package/dist/commands/uninstall.js +111 -0
- package/dist/config.d.ts +17 -0
- package/dist/config.js +90 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +35 -0
- package/dist/init.d.ts +9 -0
- package/dist/init.js +50 -0
- package/dist/install/claude-code.d.ts +13 -0
- package/dist/install/claude-code.js +118 -0
- package/dist/install/cursor.d.ts +13 -0
- package/dist/install/cursor.js +119 -0
- package/dist/install/detect.d.ts +5 -0
- package/dist/install/detect.js +64 -0
- package/dist/middleware/auth.d.ts +15 -0
- package/dist/middleware/auth.js +116 -0
- package/dist/routes/adapters/claude-code.d.ts +38 -0
- package/dist/routes/adapters/claude-code.js +125 -0
- package/dist/routes/adapters/cursor.d.ts +21 -0
- package/dist/routes/adapters/cursor.js +139 -0
- package/dist/routes/adapters/index.d.ts +16 -0
- package/dist/routes/adapters/index.js +56 -0
- package/dist/routes/adapters/router.d.ts +31 -0
- package/dist/routes/adapters/router.js +97 -0
- package/dist/routes/adapters/schema.d.ts +141 -0
- package/dist/routes/adapters/schema.js +83 -0
- package/dist/routes/adapters/windsurf.d.ts +6 -0
- package/dist/routes/adapters/windsurf.js +48 -0
- package/dist/routes/admin.d.ts +15 -0
- package/dist/routes/admin.js +399 -0
- package/dist/routes/call.d.ts +13 -0
- package/dist/routes/call.js +68 -0
- package/dist/routes/events.d.ts +7 -0
- package/dist/routes/events.js +125 -0
- package/dist/routes/health.d.ts +2 -0
- package/dist/routes/health.js +12 -0
- package/dist/routes/hooks.d.ts +11 -0
- package/dist/routes/hooks.js +166 -0
- package/dist/routes/mcp.d.ts +10 -0
- package/dist/routes/mcp.js +170 -0
- package/dist/routes/openai-tools.d.ts +9 -0
- package/dist/routes/openai-tools.js +121 -0
- package/dist/server.d.ts +11 -0
- package/dist/server.js +118 -0
- package/dist/services/audit.d.ts +92 -0
- package/dist/services/audit.js +388 -0
- package/dist/services/data-dir.d.ts +7 -0
- package/dist/services/data-dir.js +61 -0
- package/dist/services/local-policy-templates.d.ts +9 -0
- package/dist/services/local-policy-templates.js +47 -0
- package/dist/services/local-policy.d.ts +39 -0
- package/dist/services/local-policy.js +172 -0
- package/dist/services/policy-store.d.ts +82 -0
- package/dist/services/policy-store.js +331 -0
- package/dist/services/policy.d.ts +8 -0
- package/dist/services/policy.js +126 -0
- package/dist/services/ratelimit.d.ts +26 -0
- package/dist/services/ratelimit.js +60 -0
- package/dist/services/sanitizer.d.ts +9 -0
- package/dist/services/sanitizer.js +73 -0
- package/dist/services/sqlite-loader.d.ts +4 -0
- package/dist/services/sqlite-loader.js +16 -0
- package/dist/services/telemetry-log.d.ts +76 -0
- package/dist/services/telemetry-log.js +260 -0
- package/dist/services/tool-executor.d.ts +46 -0
- package/dist/services/tool-executor.js +167 -0
- package/dist/services/upstream.d.ts +18 -0
- package/dist/services/upstream.js +72 -0
- package/dist/types.d.ts +112 -0
- package/dist/types.js +3 -0
- package/package.json +72 -0
- package/public/favicon.svg +4 -0
- package/public/index.html +3893 -0
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Oculi Security End User License Agreement
|
|
2
|
+
|
|
3
|
+
Version 1.0 — Effective November 11, 2026
|
|
4
|
+
|
|
5
|
+
This End User License Agreement ("Agreement") is a binding contract between
|
|
6
|
+
you ("Customer," "you," or "your") and Oculi Security LLC, a Florida limited
|
|
7
|
+
liability company ("Oculi," "we," "us," or "our"), governing your use of the
|
|
8
|
+
Oculi Security software, including the `oculi` command-line interface, the
|
|
9
|
+
Oculi gateway server, related libraries, binaries, and documentation
|
|
10
|
+
(collectively, the "Software").
|
|
11
|
+
|
|
12
|
+
BY DOWNLOADING, INSTALLING, OR USING THE SOFTWARE, YOU AGREE TO BE BOUND BY
|
|
13
|
+
THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, OR USE THE
|
|
14
|
+
SOFTWARE.
|
|
15
|
+
|
|
16
|
+
--------------------------------------------------------------------------------
|
|
17
|
+
|
|
18
|
+
1. LICENSE GRANT
|
|
19
|
+
|
|
20
|
+
1.1 Free Use License. Subject to your compliance with this Agreement, Oculi
|
|
21
|
+
grants you a limited, non-exclusive, non-transferable, non-sublicensable,
|
|
22
|
+
revocable license to install and use the Software internally within your
|
|
23
|
+
organization at no cost, provided that:
|
|
24
|
+
|
|
25
|
+
(a) your total event volume across all Oculi gateway instances does not
|
|
26
|
+
exceed 100,000 events per day (the "Free Use Limit"); and
|
|
27
|
+
|
|
28
|
+
(b) you do not enable, attempt to enable, or otherwise use any features
|
|
29
|
+
designated as "Enterprise" features.
|
|
30
|
+
|
|
31
|
+
1.2 Enterprise License. Use of the Software in excess of the Free Use Limit,
|
|
32
|
+
or use of Enterprise features, requires a separate commercial license
|
|
33
|
+
agreement with Oculi and payment of applicable fees. Contact
|
|
34
|
+
sales@oculisecurity.com.
|
|
35
|
+
|
|
36
|
+
1.3 Evaluation. You may evaluate Enterprise features for a period of up to
|
|
37
|
+
30 days by requesting an evaluation license key from Oculi. Evaluation use
|
|
38
|
+
is solely for internal assessment and may not be used in production.
|
|
39
|
+
|
|
40
|
+
--------------------------------------------------------------------------------
|
|
41
|
+
|
|
42
|
+
2. RESTRICTIONS
|
|
43
|
+
|
|
44
|
+
You shall not, and shall not permit any third party to:
|
|
45
|
+
|
|
46
|
+
(a) copy, modify, or create derivative works of the Software, except as
|
|
47
|
+
expressly permitted by this Agreement;
|
|
48
|
+
|
|
49
|
+
(b) reverse engineer, disassemble, decompile, decode, or otherwise attempt
|
|
50
|
+
to derive or gain access to the source code of the Software, except to
|
|
51
|
+
the extent such restriction is prohibited by applicable law;
|
|
52
|
+
|
|
53
|
+
(c) rent, lease, lend, sell, sublicense, assign, distribute, publish,
|
|
54
|
+
transfer, or otherwise make available the Software to any third party;
|
|
55
|
+
|
|
56
|
+
(d) use the Software to provide a hosted, managed, or embedded service to
|
|
57
|
+
third parties whose value derives, entirely or primarily, from the
|
|
58
|
+
functionality of the Software;
|
|
59
|
+
|
|
60
|
+
(e) use the Software to build or train a competitive product or service;
|
|
61
|
+
|
|
62
|
+
(f) remove, alter, or obscure any proprietary notices (including copyright
|
|
63
|
+
and trademark notices) on the Software;
|
|
64
|
+
|
|
65
|
+
(g) circumvent, disable, or otherwise interfere with any license
|
|
66
|
+
enforcement, feature gating, usage measurement, or security mechanism
|
|
67
|
+
of the Software, including but not limited to license key verification;
|
|
68
|
+
|
|
69
|
+
(h) use the Software in violation of applicable law or for any unlawful
|
|
70
|
+
purpose;
|
|
71
|
+
|
|
72
|
+
(i) publish or disclose to any third party the results of any benchmark
|
|
73
|
+
testing of the Software without Oculi's prior written consent.
|
|
74
|
+
|
|
75
|
+
--------------------------------------------------------------------------------
|
|
76
|
+
|
|
77
|
+
3. OWNERSHIP
|
|
78
|
+
|
|
79
|
+
The Software is licensed, not sold. Oculi and its licensors retain all right,
|
|
80
|
+
title, and interest in and to the Software, including all intellectual
|
|
81
|
+
property rights therein. No rights are granted to you other than as expressly
|
|
82
|
+
set forth in this Agreement. All rights not expressly granted are reserved
|
|
83
|
+
by Oculi.
|
|
84
|
+
|
|
85
|
+
--------------------------------------------------------------------------------
|
|
86
|
+
|
|
87
|
+
4. DATA AND PRIVACY
|
|
88
|
+
|
|
89
|
+
4.1 Customer Data. You retain all rights to data processed by your Oculi
|
|
90
|
+
installation, including hook events, telemetry, audit logs, and policy
|
|
91
|
+
configurations ("Customer Data"). Oculi does not access Customer Data unless
|
|
92
|
+
you explicitly transmit it to us (e.g., via support requests).
|
|
93
|
+
|
|
94
|
+
4.2 Telemetry. The Software may collect anonymous, aggregated usage data
|
|
95
|
+
(such as version number, feature usage counters, and error reports) to help
|
|
96
|
+
us improve the product. This collection is opt-in and can be disabled at
|
|
97
|
+
any time. No Customer Data is included in telemetry.
|
|
98
|
+
|
|
99
|
+
4.3 License Verification. For Enterprise installations, the Software performs
|
|
100
|
+
offline license verification using cryptographic signatures. No phone-home
|
|
101
|
+
is required for license validation. The Software may optionally check for
|
|
102
|
+
updates and security advisories; this can be disabled.
|
|
103
|
+
|
|
104
|
+
--------------------------------------------------------------------------------
|
|
105
|
+
|
|
106
|
+
5. SUPPORT AND UPDATES
|
|
107
|
+
|
|
108
|
+
5.1 Free Tier. Free tier users receive community support via public channels
|
|
109
|
+
(Discord, documentation site). No guaranteed response times or SLAs apply.
|
|
110
|
+
|
|
111
|
+
5.2 Enterprise. Enterprise customers receive support and updates as
|
|
112
|
+
specified in their commercial license agreement.
|
|
113
|
+
|
|
114
|
+
--------------------------------------------------------------------------------
|
|
115
|
+
|
|
116
|
+
6. TERM AND TERMINATION
|
|
117
|
+
|
|
118
|
+
6.1 Term. This Agreement is effective upon your first download, installation,
|
|
119
|
+
or use of the Software and continues until terminated.
|
|
120
|
+
|
|
121
|
+
6.2 Termination. This Agreement terminates automatically if you breach any
|
|
122
|
+
of its terms. Oculi may terminate this Agreement at any time upon written
|
|
123
|
+
notice (including by email or in-product notification) if you breach this
|
|
124
|
+
Agreement.
|
|
125
|
+
|
|
126
|
+
6.3 Effect of Termination. Upon termination, you must immediately cease all
|
|
127
|
+
use of the Software and destroy all copies in your possession. Sections 2,
|
|
128
|
+
3, 4, 7, 8, 9, and 10 survive termination.
|
|
129
|
+
|
|
130
|
+
--------------------------------------------------------------------------------
|
|
131
|
+
|
|
132
|
+
7. DISCLAIMER OF WARRANTIES
|
|
133
|
+
|
|
134
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND "AS AVAILABLE," WITHOUT WARRANTY OF
|
|
135
|
+
ANY KIND, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY WARRANTIES
|
|
136
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, NON-INFRINGEMENT,
|
|
137
|
+
OR ARISING FROM A COURSE OF DEALING, USAGE, OR TRADE PRACTICE.
|
|
138
|
+
|
|
139
|
+
OCULI DOES NOT WARRANT THAT THE SOFTWARE WILL BE UNINTERRUPTED, ERROR-FREE,
|
|
140
|
+
OR FREE OF HARMFUL COMPONENTS, OR THAT ANY DATA WILL BE SECURE OR NOT LOST
|
|
141
|
+
OR ALTERED.
|
|
142
|
+
|
|
143
|
+
THE SOFTWARE IS A SECURITY TOOL AND IS NOT A SUBSTITUTE FOR INDEPENDENT
|
|
144
|
+
SECURITY REVIEW, COMPLIANCE PROGRAMS, OR PROFESSIONAL JUDGMENT. YOU ARE
|
|
145
|
+
SOLELY RESPONSIBLE FOR THE SECURITY OF YOUR SYSTEMS AND DATA.
|
|
146
|
+
|
|
147
|
+
--------------------------------------------------------------------------------
|
|
148
|
+
|
|
149
|
+
8. LIMITATION OF LIABILITY
|
|
150
|
+
|
|
151
|
+
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL OCULI
|
|
152
|
+
BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE
|
|
153
|
+
DAMAGES, OR FOR ANY LOSS OF PROFITS, REVENUE, DATA, OR USE, ARISING OUT OF
|
|
154
|
+
OR RELATING TO THIS AGREEMENT OR THE SOFTWARE, EVEN IF OCULI HAS BEEN
|
|
155
|
+
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
156
|
+
|
|
157
|
+
OCULI'S TOTAL CUMULATIVE LIABILITY ARISING OUT OF OR RELATING TO THIS
|
|
158
|
+
AGREEMENT OR THE SOFTWARE SHALL NOT EXCEED THE GREATER OF (A) THE AMOUNTS
|
|
159
|
+
PAID BY YOU TO OCULI IN THE TWELVE MONTHS PRECEDING THE EVENT GIVING RISE
|
|
160
|
+
TO THE CLAIM, OR (B) ONE HUNDRED U.S. DOLLARS (USD $100).
|
|
161
|
+
|
|
162
|
+
--------------------------------------------------------------------------------
|
|
163
|
+
|
|
164
|
+
9. GOVERNING LAW AND DISPUTES
|
|
165
|
+
|
|
166
|
+
This Agreement is governed by the laws of the State of Florida, without
|
|
167
|
+
regard to its conflict of laws principles. Any dispute arising out of or
|
|
168
|
+
relating to this Agreement shall be brought exclusively in the state or
|
|
169
|
+
federal courts located in Hillsborough County, Florida, and you consent to
|
|
170
|
+
the personal jurisdiction of those courts.
|
|
171
|
+
|
|
172
|
+
--------------------------------------------------------------------------------
|
|
173
|
+
|
|
174
|
+
10. MISCELLANEOUS
|
|
175
|
+
|
|
176
|
+
10.1 Entire Agreement. This Agreement constitutes the entire agreement
|
|
177
|
+
between you and Oculi regarding the Software and supersedes all prior or
|
|
178
|
+
contemporaneous agreements, proposals, or representations.
|
|
179
|
+
|
|
180
|
+
10.2 Modifications. Oculi may modify this Agreement from time to time.
|
|
181
|
+
Material changes will be communicated via the Oculi website or in-product
|
|
182
|
+
notice. Your continued use of the Software after such notice constitutes
|
|
183
|
+
acceptance.
|
|
184
|
+
|
|
185
|
+
10.3 Severability. If any provision of this Agreement is held to be
|
|
186
|
+
unenforceable, the remaining provisions will continue in full force.
|
|
187
|
+
|
|
188
|
+
10.4 No Waiver. Oculi's failure to enforce any provision is not a waiver
|
|
189
|
+
of its right to do so later.
|
|
190
|
+
|
|
191
|
+
10.5 Assignment. You may not assign this Agreement without Oculi's prior
|
|
192
|
+
written consent. Oculi may assign this Agreement freely.
|
|
193
|
+
|
|
194
|
+
10.6 Export Compliance. You may not use or export the Software in violation
|
|
195
|
+
of U.S. export laws or regulations.
|
|
196
|
+
|
|
197
|
+
--------------------------------------------------------------------------------
|
|
198
|
+
|
|
199
|
+
Copyright © 2026 Oculi Security LLC. All rights reserved.
|
|
200
|
+
|
|
201
|
+
Contact: legal@oculisecurity.com
|
package/README.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Oculi
|
|
2
|
+
|
|
3
|
+
Visibility and control for AI coding agents.
|
|
4
|
+
|
|
5
|
+
You can't see what your AI coding agent is actually doing. Tool calls — shell commands, file edits, MCP requests — execute and disappear into the chat scrollback. When the agent does something wrong, you find out after, by re-reading the transcript or auditing your repo.
|
|
6
|
+
|
|
7
|
+
Oculi gives you that view, and lets you stop the agent when it's about to do something you don't want. It runs locally and hooks into Claude Code and Cursor at the tool-call boundary. A policy file decides what to allow, warn on, or block. No SDK integration, no changes to the agent itself — just hooks the agent already exposes.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install -g @oculisecurity/cli
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Requires Node.js 20 or newer.
|
|
16
|
+
|
|
17
|
+
## 60-second demo
|
|
18
|
+
|
|
19
|
+
In your project directory:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
oculi init standard
|
|
23
|
+
oculi install claude-code
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
`init` writes a `.oculi/policy.yaml` with sensible defaults. `install` adds Oculi to your `.claude/settings.json` hooks (it doesn't overwrite anything you've configured).
|
|
27
|
+
|
|
28
|
+
In a separate terminal:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
oculi serve
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
That brings up the local dashboard at <http://127.0.0.1:3000/admin/>. Leave it running.
|
|
35
|
+
|
|
36
|
+
Back in Claude Code, in the same project directory, prompt:
|
|
37
|
+
|
|
38
|
+
> Run `rm -rf /tmp/oculi-demo-scratch` to clean up.
|
|
39
|
+
|
|
40
|
+
Claude Code's Bash tool call is blocked. The reason `Blocked by Oculi rule: no-rm-rf` surfaces in the agent UI, and the event appears in the dashboard with the rule name, the command, the timestamp, and the session ID.
|
|
41
|
+
|
|
42
|
+
## What works today
|
|
43
|
+
|
|
44
|
+
- Claude Code hooks: PreToolUse, PostToolUse, Stop
|
|
45
|
+
- Cursor hooks: beforeShellExecution, beforeReadFile, afterFileEdit, before/afterMCPExecution, stop
|
|
46
|
+
- Local policy evaluation with four rule types: tool-name match, shell command regex, file-path regex, MCP server match
|
|
47
|
+
- Real-time dashboard with audit search, filters, and per-decision views
|
|
48
|
+
- SQLite audit log at `~/.oculi/oculi.db` — survives restarts
|
|
49
|
+
|
|
50
|
+
## What's coming
|
|
51
|
+
|
|
52
|
+
- Windsurf installer (the emit adapter exists; the auto-install path is in progress)
|
|
53
|
+
- First-class warning visualization in the dashboard
|
|
54
|
+
- Multi-developer central gateway for fleet visibility
|
|
55
|
+
- Scoped credential injection at the tool-call boundary
|
|
56
|
+
|
|
57
|
+
## Documentation
|
|
58
|
+
|
|
59
|
+
Full configuration reference, policy syntax, and integration guides: <https://oculisecurity.com/docs>
|
|
60
|
+
|
|
61
|
+
## License
|
|
62
|
+
|
|
63
|
+
Oculi Source-Available License. Free for use up to 100,000 events per day per organization. See [LICENSE.txt](./LICENSE.txt) for full terms.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
© 2026 Oculi Security LLC.
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Oculi CLI — hook router + installer.
|
|
4
|
+
*
|
|
5
|
+
* Subcommands:
|
|
6
|
+
* oculi emit [adapter] — read stdin, route to gateway (default behaviour)
|
|
7
|
+
* oculi install [--agent <name>] — wire user-level hooks + write ~/.oculi/policy.yaml
|
|
8
|
+
* oculi init [--agent <name>] — alias of install (legacy name)
|
|
9
|
+
* oculi uninstall [--agent <name>] — remove Oculi hooks (and policy when no agent remains)
|
|
10
|
+
* oculi serve [options] — start the gateway + dashboard
|
|
11
|
+
* oculi tail [--filter <action>] — live-stream telemetry log
|
|
12
|
+
* oculi report [--json] [--hours N] — summarize recent telemetry
|
|
13
|
+
*
|
|
14
|
+
* Environment variables (emit only):
|
|
15
|
+
* GATEWAY_URL Base URL of the Oculi gateway (default: http://localhost:3000)
|
|
16
|
+
* GATEWAY_TOKEN Bearer token for gateway auth (optional)
|
|
17
|
+
*/
|
|
18
|
+
export {};
|