Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ dist/
*.log
.DS_Store
.env
.env.test
.env.local
.env.development.local
.env.test.local
Expand Down
862 changes: 675 additions & 187 deletions README.md

Large diffs are not rendered by default.

13 changes: 2 additions & 11 deletions SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: tigris
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."
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.'
user-invocable: false
---

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

## Environment Variables

When configuring S3-compatible access (SDKs, Terraform, etc.):

```sh
export AWS_ENDPOINT_URL_S3=https://t3.storage.dev
export AWS_REGION=auto
export AWS_ACCESS_KEY_ID=<your-access-key>
export AWS_SECRET_ACCESS_KEY=<your-secret-key>
```

## Key Commands
Expand Down Expand Up @@ -62,7 +53,7 @@ export AWS_SECRET_ACCESS_KEY=<your-secret-key>

## Conventions

- Always use `--dry-run` for mutating operations when available.
- Use `t3://` URI prefix for remote paths (e.g., `t3://my-bucket/path/file.txt`).
- The `t3` shorthand works for all commands: `t3 ls`, `t3 cp`, etc.
- Paths support both `t3://` and `tigris://` prefixes.
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"scripts": {
"build": "tsc --noEmit && tsup",
"dev": "export $(grep -v '^#' .env | xargs) && (tsc --noEmit --watch --preserveWatchOutput & tsup --watch)",
"dev": "export $(grep -v '^#' .env.test | xargs) && (tsc --noEmit --watch --preserveWatchOutput & tsup --watch)",
"cli": "node dist/cli.js",
"lint": "eslint src test",
"lint:fix": "eslint src test --fix",
Expand Down
44 changes: 43 additions & 1 deletion scripts/update-docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ function generateDocs(specs: Specs): string {
lines.push('');

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

// Other commands (CLI management)
const otherCommands = ['update'].filter((c) => isImplemented(c));
if (otherCommands.length > 0) {
lines.push('### Other');
lines.push('');
for (const cmdName of otherCommands) {
const cmd = specs.commands.find((c) => c.name === cmdName);
if (cmd) {
lines.push(`- \`tigris ${cmd.name}\` - ${cmd.description}`);
}
}
lines.push('');
}

// Resource management
const resourceCommands = ['organizations', 'access-keys', 'credentials', 'buckets', 'forks', 'snapshots', 'objects', 'iam'];
const implementedResources = resourceCommands.filter((c) => {
Expand Down Expand Up @@ -359,6 +373,34 @@ function generateDocs(specs: Specs): string {
}
}

// Other commands
if (otherCommands.length > 0) {
lines.push('## Other');
lines.push('');
for (const cmdName of otherCommands) {
const cmd = specs.commands.find((c) => c.name === cmdName);
if (cmd) {
lines.push(generateCommandSection(cmd));
}
}
}

// Warn about any specs commands that aren't in any category
const allCategorized = new Set([
...coreCommands,
...authCommandNames,
...resourceCommands,
...otherCommands,
]);
const unhandled = specs.commands
.filter((c) => !allCategorized.has(c.name) && hasImplementation(c))
.map((c) => c.name);
if (unhandled.length > 0) {
console.warn(
`Warning: the following implemented commands are not in any docs category: ${unhandled.join(', ')}`
);
}

return lines.join('\n');
}

Expand Down
10 changes: 5 additions & 5 deletions vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { defineConfig } from 'vitest/config';
import path from 'path';
import dotenv from 'dotenv';
import path from 'path';
import { defineConfig } from 'vitest/config';

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

export default defineConfig({
resolve: {
Expand All @@ -15,7 +15,7 @@ export default defineConfig({
test: {
globals: true,
environment: 'node',
reporter: 'verbose',
reporters: 'verbose',
include: ['test/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
exclude: ['node_modules', 'dist'],
setupFiles: ['test/setup.ts'],
Expand Down