Skip to content

Commit eb5be02

Browse files
committed
docs: add non-interactive mode examples to README and update release workflow to use trusted publishers
1 parent 3670431 commit eb5be02

File tree

2 files changed

+106
-4
lines changed

2 files changed

+106
-4
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,20 @@ on:
44
release:
55
types: [ published ]
66

7+
permissions:
8+
id-token: write
9+
contents: read
10+
711
jobs:
812
release:
913
runs-on: ubuntu-latest
1014

1115
steps:
1216
- name: Checkout repository
13-
uses: actions/checkout@v3
17+
uses: actions/checkout@v6
1418

1519
- name: Setup Node.js
16-
uses: actions/setup-node@v4
20+
uses: actions/setup-node@v6
1721
with:
1822
node-version: '20'
1923
registry-url: 'https://registry.npmjs.org'
@@ -34,5 +38,3 @@ jobs:
3438
- name: Publish to npm
3539
if: ${{ github.event.release.prerelease == false }}
3640
run: pnpm publish --no-git-checks
37-
env:
38-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

readme.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,106 @@ pnpm dlx dappbooster
1717

1818
dAppBooster documentation: https://docs.dappbooster.dev/
1919

20+
## Non-interactive / CI mode
21+
22+
The installer supports a non-interactive mode for CI pipelines and AI agents. It activates automatically when stdout is not a TTY, or explicitly with the `--ni` flag.
23+
24+
### Discover available features
25+
26+
```shell
27+
pnpm dlx dappbooster --info
28+
```
29+
30+
```json
31+
{
32+
"features": {
33+
"demo": {
34+
"description": "Component demos and example pages",
35+
"default": true
36+
},
37+
"subgraph": {
38+
"description": "TheGraph subgraph integration",
39+
"default": true,
40+
"postInstall": [
41+
"Provide your own API key for PUBLIC_SUBGRAPHS_API_KEY in .env.local",
42+
"Run pnpm subgraph-codegen from the project folder"
43+
]
44+
},
45+
"typedoc": {
46+
"description": "TypeDoc API documentation generation",
47+
"default": true
48+
},
49+
"vocs": {
50+
"description": "Vocs documentation site",
51+
"default": true
52+
},
53+
"husky": {
54+
"description": "Git hooks with Husky, lint-staged, and commitlint",
55+
"default": true
56+
}
57+
},
58+
"modes": {
59+
"full": "Install all features",
60+
"custom": "Choose features individually"
61+
}
62+
}
63+
```
64+
65+
### Full install
66+
67+
```shell
68+
pnpm dlx dappbooster --ni --name my_dapp --mode full
69+
```
70+
71+
```json
72+
{
73+
"success": true,
74+
"projectName": "my_dapp",
75+
"mode": "full",
76+
"features": ["demo", "subgraph", "typedoc", "vocs", "husky"],
77+
"path": "/absolute/path/to/my_dapp",
78+
"postInstall": [
79+
"Provide your own API key for PUBLIC_SUBGRAPHS_API_KEY in .env.local",
80+
"Run pnpm subgraph-codegen from the project folder"
81+
]
82+
}
83+
```
84+
85+
### Custom install with selected features
86+
87+
```shell
88+
pnpm dlx dappbooster --ni --name my_dapp --mode custom --features demo,subgraph
89+
```
90+
91+
```json
92+
{
93+
"success": true,
94+
"projectName": "my_dapp",
95+
"mode": "custom",
96+
"features": ["demo", "subgraph"],
97+
"path": "/absolute/path/to/my_dapp",
98+
"postInstall": [
99+
"Provide your own API key for PUBLIC_SUBGRAPHS_API_KEY in .env.local",
100+
"Run pnpm subgraph-codegen from the project folder"
101+
]
102+
}
103+
```
104+
105+
### Error handling
106+
107+
Errors return structured JSON with a non-zero exit code:
108+
109+
```shell
110+
pnpm dlx dappbooster --ni --mode full
111+
```
112+
113+
```json
114+
{
115+
"success": false,
116+
"error": "Missing required flag: --name"
117+
}
118+
```
119+
20120
## Development
21121

22122
Clone the repo

0 commit comments

Comments
 (0)