Skip to content

Commit e4f6a70

Browse files
authored
chore: update docs (#86)
* chore: rename .env * chore: update docs
1 parent c6ed6db commit e4f6a70

6 files changed

Lines changed: 727 additions & 205 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ dist/
33
*.log
44
.DS_Store
55
.env
6+
.env.test
67
.env.local
78
.env.development.local
89
.env.test.local

README.md

Lines changed: 675 additions & 187 deletions
Large diffs are not rendered by default.

SKILL.md

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: tigris
3-
description: "Tigris object storage CLI reference. Use when working with object storage, file uploads, S3-compatible buckets, or blob storage. Provides commands, conventions, and environment setup for using Tigris via the tigris (t3) CLI."
3+
description: 'Tigris object storage CLI reference. Use when working with object storage, file uploads, S3-compatible buckets, or blob storage. Provides commands, conventions, and environment setup for using Tigris via the tigris (t3) CLI.'
44
user-invocable: false
55
---
66

@@ -13,15 +13,6 @@ Use Tigris for all object storage tasks. Prefer the Tigris CLI (`tigris` or shor
1313
- **Single endpoint**: `https://t3.storage.dev`
1414
- **Region**: `auto` (Tigris handles routing automatically)
1515

16-
## Environment Variables
17-
18-
When configuring S3-compatible access (SDKs, Terraform, etc.):
19-
20-
```sh
21-
export AWS_ENDPOINT_URL_S3=https://t3.storage.dev
22-
export AWS_REGION=auto
23-
export AWS_ACCESS_KEY_ID=<your-access-key>
24-
export AWS_SECRET_ACCESS_KEY=<your-secret-key>
2516
```
2617
2718
## Key Commands
@@ -62,7 +53,7 @@ export AWS_SECRET_ACCESS_KEY=<your-secret-key>
6253
6354
## Conventions
6455
65-
- Always use `--dry-run` for mutating operations when available.
6656
- Use `t3://` URI prefix for remote paths (e.g., `t3://my-bucket/path/file.txt`).
6757
- The `t3` shorthand works for all commands: `t3 ls`, `t3 cp`, etc.
6858
- Paths support both `t3://` and `tigris://` prefixes.
59+
```

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
},
2424
"scripts": {
2525
"build": "tsc --noEmit && tsup",
26-
"dev": "export $(grep -v '^#' .env | xargs) && (tsc --noEmit --watch --preserveWatchOutput & tsup --watch)",
26+
"dev": "export $(grep -v '^#' .env.test | xargs) && (tsc --noEmit --watch --preserveWatchOutput & tsup --watch)",
2727
"cli": "node dist/cli.js",
2828
"lint": "eslint src test",
2929
"lint:fix": "eslint src test --fix",

scripts/update-docs.ts

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ function generateDocs(specs: Specs): string {
227227
lines.push('');
228228

229229
// Core commands (Unix-style) - only implemented ones
230-
const coreCommands = ['ls', 'mk', 'touch', 'cp', 'mv', 'rm', 'stat'].filter((c) => isImplemented(c));
230+
const coreCommands = ['ls', 'mk', 'touch', 'cp', 'mv', 'rm', 'stat', 'presign', 'bundle'].filter((c) => isImplemented(c));
231231
lines.push('### Core Commands');
232232
lines.push('');
233233
for (const cmdName of coreCommands) {
@@ -255,6 +255,20 @@ function generateDocs(specs: Specs): string {
255255
}
256256
lines.push('');
257257

258+
// Other commands (CLI management)
259+
const otherCommands = ['update'].filter((c) => isImplemented(c));
260+
if (otherCommands.length > 0) {
261+
lines.push('### Other');
262+
lines.push('');
263+
for (const cmdName of otherCommands) {
264+
const cmd = specs.commands.find((c) => c.name === cmdName);
265+
if (cmd) {
266+
lines.push(`- \`tigris ${cmd.name}\` - ${cmd.description}`);
267+
}
268+
}
269+
lines.push('');
270+
}
271+
258272
// Resource management
259273
const resourceCommands = ['organizations', 'access-keys', 'credentials', 'buckets', 'forks', 'snapshots', 'objects', 'iam'];
260274
const implementedResources = resourceCommands.filter((c) => {
@@ -359,6 +373,34 @@ function generateDocs(specs: Specs): string {
359373
}
360374
}
361375

376+
// Other commands
377+
if (otherCommands.length > 0) {
378+
lines.push('## Other');
379+
lines.push('');
380+
for (const cmdName of otherCommands) {
381+
const cmd = specs.commands.find((c) => c.name === cmdName);
382+
if (cmd) {
383+
lines.push(generateCommandSection(cmd));
384+
}
385+
}
386+
}
387+
388+
// Warn about any specs commands that aren't in any category
389+
const allCategorized = new Set([
390+
...coreCommands,
391+
...authCommandNames,
392+
...resourceCommands,
393+
...otherCommands,
394+
]);
395+
const unhandled = specs.commands
396+
.filter((c) => !allCategorized.has(c.name) && hasImplementation(c))
397+
.map((c) => c.name);
398+
if (unhandled.length > 0) {
399+
console.warn(
400+
`Warning: the following implemented commands are not in any docs category: ${unhandled.join(', ')}`
401+
);
402+
}
403+
362404
return lines.join('\n');
363405
}
364406

vitest.config.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { defineConfig } from 'vitest/config';
2-
import path from 'path';
31
import dotenv from 'dotenv';
2+
import path from 'path';
3+
import { defineConfig } from 'vitest/config';
44

5-
// Load .env for integration tests
6-
dotenv.config({ path: path.resolve(__dirname, '.env') });
5+
// Load .env.test for integration tests
6+
dotenv.config({ path: path.resolve(__dirname, '.env.test') });
77

88
export default defineConfig({
99
resolve: {
@@ -15,7 +15,7 @@ export default defineConfig({
1515
test: {
1616
globals: true,
1717
environment: 'node',
18-
reporter: 'verbose',
18+
reporters: 'verbose',
1919
include: ['test/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
2020
exclude: ['node_modules', 'dist'],
2121
setupFiles: ['test/setup.ts'],

0 commit comments

Comments
 (0)