srcpack 0.1.2 → 0.1.4
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 +28 -25
- package/dist/bundle.d.ts +3 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +51027 -17210
- package/dist/config.d.ts +3 -3
- package/dist/gdrive.d.ts +17 -4
- package/dist/index.js +1515 -1514
- package/package.json +16 -5
- package/src/bundle.ts +52 -25
- package/src/cli.ts +105 -29
- package/src/config.ts +1 -1
- package/src/gdrive.ts +166 -24
- package/src/init.ts +2 -2
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Zero-config CLI for bundling code into LLM-optimized context files.
|
|
4
4
|
|
|
5
|
+
**Requirements:** Node.js 20+ or Bun
|
|
6
|
+
|
|
5
7
|
## Quick Start
|
|
6
8
|
|
|
7
9
|
```bash
|
|
@@ -58,9 +60,12 @@ Or add to `package.json`:
|
|
|
58
60
|
// Simple glob
|
|
59
61
|
"src/**/*"
|
|
60
62
|
|
|
61
|
-
// Array with exclusions
|
|
63
|
+
// Array with exclusions (! prefix)
|
|
62
64
|
["src/**/*", "!src/**/*.test.ts"]
|
|
63
65
|
|
|
66
|
+
// Force-include gitignored files (+ prefix)
|
|
67
|
+
["docs/**/*", "+docs/**/*.local.md"]
|
|
68
|
+
|
|
64
69
|
// Full options
|
|
65
70
|
{
|
|
66
71
|
include: "src/**/*",
|
|
@@ -69,7 +74,7 @@ Or add to `package.json`:
|
|
|
69
74
|
}
|
|
70
75
|
```
|
|
71
76
|
|
|
72
|
-
Patterns follow glob syntax. Prefix with `!` to exclude
|
|
77
|
+
Patterns follow glob syntax. Prefix with `!` to exclude, `+` to force-include (bypasses `.gitignore`). Binary files are excluded.
|
|
73
78
|
|
|
74
79
|
### Google Drive Upload
|
|
75
80
|
|
|
@@ -82,9 +87,9 @@ export default defineConfig({
|
|
|
82
87
|
},
|
|
83
88
|
upload: {
|
|
84
89
|
provider: "gdrive",
|
|
85
|
-
|
|
86
|
-
clientId: "...",
|
|
87
|
-
clientSecret: "...",
|
|
90
|
+
folderId: "1ABC...", // Google Drive folder ID (from URL)
|
|
91
|
+
clientId: "...",
|
|
92
|
+
clientSecret: "...",
|
|
88
93
|
},
|
|
89
94
|
});
|
|
90
95
|
```
|
|
@@ -96,25 +101,7 @@ export default defineConfig({
|
|
|
96
101
|
3. Enable the Google Drive API
|
|
97
102
|
4. Go to **Credentials** → **Create Credentials** → **OAuth client ID**
|
|
98
103
|
5. Select **Desktop app**, then copy the client ID and secret
|
|
99
|
-
|
|
100
|
-
Multiple destinations are supported via array:
|
|
101
|
-
|
|
102
|
-
```typescript
|
|
103
|
-
upload: [
|
|
104
|
-
{
|
|
105
|
-
provider: "gdrive",
|
|
106
|
-
folder: "backup1",
|
|
107
|
-
clientId: "...",
|
|
108
|
-
clientSecret: "...",
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
provider: "gdrive",
|
|
112
|
-
folder: "backup2",
|
|
113
|
-
clientId: "...",
|
|
114
|
-
clientSecret: "...",
|
|
115
|
-
},
|
|
116
|
-
];
|
|
117
|
-
```
|
|
104
|
+
6. Run `npx srcpack login` to authenticate
|
|
118
105
|
|
|
119
106
|
## Output Format
|
|
120
107
|
|
|
@@ -140,10 +127,12 @@ export function utils() {
|
|
|
140
127
|
## CLI
|
|
141
128
|
|
|
142
129
|
```bash
|
|
143
|
-
npx srcpack # Bundle all, upload if
|
|
130
|
+
npx srcpack # Bundle all, upload if configured
|
|
144
131
|
npx srcpack web api # Bundle specific bundles only
|
|
145
132
|
npx srcpack --dry-run # Preview without writing files
|
|
133
|
+
npx srcpack --no-upload # Bundle only, skip upload
|
|
146
134
|
npx srcpack init # Interactive config setup
|
|
135
|
+
npx srcpack login # Authenticate with Google Drive
|
|
147
136
|
```
|
|
148
137
|
|
|
149
138
|
## API
|
|
@@ -160,6 +149,20 @@ export default defineConfig({
|
|
|
160
149
|
const config = await loadConfig();
|
|
161
150
|
```
|
|
162
151
|
|
|
152
|
+
## LLM Context
|
|
153
|
+
|
|
154
|
+
- https://kriasoft.com/srcpack/llms.txt
|
|
155
|
+
- https://kriasoft.com/srcpack/llms-full.txt
|
|
156
|
+
|
|
157
|
+
## Community
|
|
158
|
+
|
|
159
|
+
- [Discord](https://discord.com/invite/aG83xEb6RX) — Questions, feedback, and discussion
|
|
160
|
+
- [GitHub Issues](https://github.com/kriasoft/srcpack/issues) — Bug reports and feature requests
|
|
161
|
+
|
|
162
|
+
## Backers
|
|
163
|
+
|
|
164
|
+
<a href="https://reactstarter.com/b/1"><img src="https://reactstarter.com/b/1.png" height="60" /></a> <a href="https://reactstarter.com/b/2"><img src="https://reactstarter.com/b/2.png" height="60" /></a> <a href="https://reactstarter.com/b/3"><img src="https://reactstarter.com/b/3.png" height="60" /></a> <a href="https://reactstarter.com/b/4"><img src="https://reactstarter.com/b/4.png" height="60" /></a> <a href="https://reactstarter.com/b/5"><img src="https://reactstarter.com/b/5.png" height="60" /></a> <a href="https://reactstarter.com/b/6"><img src="https://reactstarter.com/b/6.png" height="60" /></a> <a href="https://reactstarter.com/b/7"><img src="https://reactstarter.com/b/7.png" height="60" /></a> <a href="https://reactstarter.com/b/8"><img src="https://reactstarter.com/b/8.png" height="60" /></a>
|
|
165
|
+
|
|
163
166
|
## License
|
|
164
167
|
|
|
165
168
|
MIT
|
package/dist/bundle.d.ts
CHANGED
|
@@ -11,7 +11,9 @@ export interface BundleResult {
|
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* Resolve bundle config to a list of file paths.
|
|
14
|
-
*
|
|
14
|
+
* - Regular patterns respect .gitignore
|
|
15
|
+
* - Force patterns (+prefix) bypass .gitignore
|
|
16
|
+
* - Exclude patterns (!prefix) filter both
|
|
15
17
|
*/
|
|
16
18
|
export declare function resolvePatterns(config: BundleConfigInput, cwd: string): Promise<string[]>;
|
|
17
19
|
/**
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#!/usr/bin/env
|
|
1
|
+
#!/usr/bin/env node
|
|
2
2
|
export {};
|