opendevtool 0.5.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.
Files changed (3) hide show
  1. package/README.md +135 -0
  2. package/dist/open.js +32422 -0
  3. package/package.json +59 -0
package/README.md ADDED
@@ -0,0 +1,135 @@
1
+ # opendev
2
+
3
+ Visual transaction debugger and CU profiler for Solana.
4
+
5
+ `opendev` takes any Solana transaction signature (or an unsigned base64 blob) and turns it into a fully decoded execution profile — compute unit usage, CPI call trees, account state changes, transfer breakdowns, and an insight layer that flags bottlenecks automatically.
6
+
7
+ ## Install
8
+
9
+ Easiest — via npm (any OS with Node.js 20+):
10
+ ```bash
11
+ npm install -g opendevtool
12
+ opendev --version
13
+ ```
14
+
15
+ Note: package is named `opendevtool` on npm (unqualified `opendev` was taken). The binary it installs is still `opendev`.
16
+
17
+ Or, one-liner for Linux / macOS / WSL (sets up Node 20 via nvm if missing):
18
+ ```bash
19
+ curl -fsSL https://raw.githubusercontent.com/OpenSubmissionn/Open_DevTool/main/install.sh | sh
20
+ ```
21
+
22
+ Or, from source:
23
+ ```bash
24
+ git clone https://github.com/OpenSubmissionn/Open_DevTool.git
25
+ cd Open_DevTool
26
+ npm install
27
+ npm run build --workspace cli
28
+ cd cli && npm install -g . --ignore-scripts
29
+ ```
30
+
31
+ For local development with hot-reload:
32
+ ```bash
33
+ git clone https://github.com/OpenSubmissionn/Open_DevTool.git
34
+ cd Open_DevTool
35
+ npm install
36
+ npm run build
37
+ npm link
38
+ ```
39
+
40
+ That makes `opendev` point at your working tree.
41
+
42
+ ## Quickstart
43
+
44
+ Analyze a confirmed transaction on mainnet:
45
+
46
+ ```bash
47
+ opendev tx <SIGNATURE>
48
+ ```
49
+
50
+ Analyze on devnet:
51
+
52
+ ```bash
53
+ opendev tx <SIGNATURE> --network devnet
54
+ ```
55
+
56
+ Output as JSON:
57
+
58
+ ```bash
59
+ opendev tx <SIGNATURE> --json
60
+ ```
61
+
62
+ Save a CSV report:
63
+
64
+ ```bash
65
+ opendev tx <SIGNATURE> --csv --output ./report.csv
66
+ ```
67
+
68
+ Simulate a transaction that has not been broadcast yet (base64 blob or path to a file containing one):
69
+
70
+ ```bash
71
+ opendev simulate <BASE64_TX>
72
+ opendev simulate ./my-tx.b64
73
+ ```
74
+
75
+ ## Commands
76
+
77
+ | Command | Description |
78
+ |---|---|
79
+ | `opendev tx <signature>` | Full analysis of a confirmed transaction |
80
+ | `opendev simulate <input>` | Simulate an unsigned transaction (base64 blob or file path) |
81
+ | `opendev batch <file>` | Run analysis over a list of signatures |
82
+ | `opendev info` | Show registered programs and decoder coverage |
83
+ | `opendev login [provider]` | Browser-assisted setup for AI insights (default: groq) |
84
+ | `opendev config set-key <provider> <key>` | Save an AI provider key from a script |
85
+ | `opendev config get-key [provider]` | List configured keys (masked) and their source |
86
+ | `opendev config remove-key <provider>` | Delete a key from the credential store |
87
+ | `opendev config set-rpc <url>` | Set the default Solana RPC URL |
88
+
89
+ Run `opendev <command> --help` for the full flag list.
90
+
91
+ ## Common flags
92
+
93
+ | Flag | Default | Description |
94
+ |---|---|---|
95
+ | `--network <name>` | `mainnet` | `mainnet` or `devnet` |
96
+ | `--rpc <url>` | — | Custom RPC URL (overrides `--network`) |
97
+ | `--json` | `false` | Output as machine-readable JSON |
98
+ | `--csv` | `false` | Save a CSV report |
99
+ | `--output <path>` | — | Output file path |
100
+ | `--verbose` | `false` | Enable debug logging |
101
+
102
+ ## AI insights (optional)
103
+
104
+ opendev ships rule-based insights by default. To add AI-generated optimization suggestions, get a free key from [console.groq.com/keys](https://console.groq.com/keys) (no credit card) or a paid one from [console.anthropic.com](https://console.anthropic.com), then:
105
+
106
+ ```bash
107
+ opendev login # browser opens, paste key, gets validated, saved
108
+ ```
109
+
110
+ Keys live in `~/.opendev/credentials.json` (chmod 600). For scripted setup:
111
+
112
+ ```bash
113
+ opendev config set-key groq gsk_xxxxxxxxxxxxxxxx
114
+ opendev config get-key # confirm
115
+ ```
116
+
117
+ Shell `GROQ_API_KEY` / `ANTHROPIC_API_KEY` exports still work and take precedence.
118
+
119
+ ## Configuration
120
+
121
+ To use a custom RPC by default, set `OPEN_RPC_URL` in your environment:
122
+
123
+ ```bash
124
+ export OPEN_RPC_URL=https://your-rpc.example.com
125
+ opendev tx <SIGNATURE>
126
+ ```
127
+
128
+ ## Links
129
+
130
+ - [Source code](https://github.com/OpenSubmissionn/Open_DevTool)
131
+ - [Issues](https://github.com/OpenSubmissionn/Open_DevTool/issues)
132
+
133
+ ## License
134
+
135
+ MIT