@better-sol/cli 0.1.0-alpha.1 → 0.1.0-alpha.10
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/README.md +13 -9
- package/dist/index.js +2837 -2747
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# @better-sol/cli
|
|
2
2
|
|
|
3
|
+
> **Alpha**
|
|
4
|
+
>
|
|
5
|
+
> Better Sol is in early development. APIs may change, rough edges exist, and things can break. Your feedback shapes what comes next. Thank you for being an early adopter.
|
|
6
|
+
|
|
3
7
|
The Better Sol command-line tool. Scaffold programs, compile and deploy to Solana, generate database schemas, and import external programs.
|
|
4
8
|
|
|
5
9
|
No installation needed. Run with `npx` or `bunx`.
|
|
@@ -11,7 +15,7 @@ No installation needed. Run with `npx` or `bunx`.
|
|
|
11
15
|
Set up a new project.
|
|
12
16
|
|
|
13
17
|
```bash
|
|
14
|
-
npx @better-sol/cli init
|
|
18
|
+
npx @better-sol/cli@alpha init
|
|
15
19
|
```
|
|
16
20
|
|
|
17
21
|
Creates a payer keypair at `keypair.json`, a `programs/` directory, and a `.gitignore`. Detects your existing Solana CLI keypair at `~/.config/solana/id.json` if you have one. Offers to install `better-sol` if a `package.json` exists.
|
|
@@ -26,7 +30,7 @@ Creates a payer keypair at `keypair.json`, a `programs/` directory, and a `.giti
|
|
|
26
30
|
Scaffold a new program.
|
|
27
31
|
|
|
28
32
|
```bash
|
|
29
|
-
npx @better-sol/cli create counter
|
|
33
|
+
npx @better-sol/cli@alpha create counter
|
|
30
34
|
```
|
|
31
35
|
|
|
32
36
|
Generates `programs/counter.ts` with a working counter template and `.better-sol/counter.json` with the program keypair.
|
|
@@ -41,7 +45,7 @@ Generates `programs/counter.ts` with a working counter template and `.better-sol
|
|
|
41
45
|
Compile and deploy to Solana.
|
|
42
46
|
|
|
43
47
|
```bash
|
|
44
|
-
npx @better-sol/cli deploy
|
|
48
|
+
npx @better-sol/cli@alpha deploy
|
|
45
49
|
```
|
|
46
50
|
|
|
47
51
|
Parses your TypeScript, generates Anchor Rust, compiles it via the cloud API, and deploys the binary. On devnet and testnet, automatically funds your payer if the balance is low.
|
|
@@ -62,10 +66,10 @@ Import an external program from an on-chain address or a local IDL file.
|
|
|
62
66
|
|
|
63
67
|
```bash
|
|
64
68
|
# From an on-chain program
|
|
65
|
-
npx @better-sol/cli generate idl 12b3t1cNiAUoYLiWFEnFa4w6qYxVAiqCWU7KZuzLPYtH
|
|
69
|
+
npx @better-sol/cli@alpha generate idl 12b3t1cNiAUoYLiWFEnFa4w6qYxVAiqCWU7KZuzLPYtH
|
|
66
70
|
|
|
67
71
|
# From a local IDL JSON file
|
|
68
|
-
npx @better-sol/cli generate idl ./staking-idl.json
|
|
72
|
+
npx @better-sol/cli@alpha generate idl ./staking-idl.json
|
|
69
73
|
```
|
|
70
74
|
|
|
71
75
|
Produces a typed `.ts` file in `generated/`. Detects whether the argument is an address or a file path automatically.
|
|
@@ -81,7 +85,7 @@ Produces a typed `.ts` file in `generated/`. Detects whether the argument is an
|
|
|
81
85
|
Generate a Drizzle ORM schema from your account definitions.
|
|
82
86
|
|
|
83
87
|
```bash
|
|
84
|
-
npx @better-sol/cli generate db
|
|
88
|
+
npx @better-sol/cli@alpha generate db
|
|
85
89
|
```
|
|
86
90
|
|
|
87
91
|
| Flag | Default | Description |
|
|
@@ -95,17 +99,17 @@ npx @better-sol/cli generate db
|
|
|
95
99
|
Save your compiler API key.
|
|
96
100
|
|
|
97
101
|
```bash
|
|
98
|
-
npx @better-sol/cli login
|
|
102
|
+
npx @better-sol/cli@alpha login <api-key>
|
|
99
103
|
```
|
|
100
104
|
|
|
101
|
-
Saves your key to `.better-sol/auth.json`.
|
|
105
|
+
Get an API key at https://better-sol.fun/dash. Saves your key to `.better-sol/auth.json`. Because Better Sol is still experimental, compiler usage is rate limited: without a key you get 20 compiles per hour, and with a key you get 100 per hour.
|
|
102
106
|
|
|
103
107
|
### `verify`
|
|
104
108
|
|
|
105
109
|
Submit a deployed program for OtterSec verified-builds.
|
|
106
110
|
|
|
107
111
|
```bash
|
|
108
|
-
npx @better-sol/cli verify counter --program-id <address>
|
|
112
|
+
npx @better-sol/cli@alpha verify counter --program-id <address>
|
|
109
113
|
```
|
|
110
114
|
|
|
111
115
|
| Flag | Description |
|