mirror of
https://github.com/stablyai/orca.git
synced 2026-10-02 16:02:15 +00:00
57 lines
2.1 KiB
TypeScript
57 lines
2.1 KiB
TypeScript
import type { CommandSpec } from '../args'
|
|
import { GLOBAL_FLAGS } from '../args'
|
|
|
|
const CLOUD_FLAGS = ['api-url']
|
|
|
|
export const ARTIFACT_COMMAND_SPECS: CommandSpec[] = [
|
|
{
|
|
path: ['artifacts', 'read'],
|
|
summary: 'Read an HTML or Markdown artifact by id or share URL',
|
|
usage: 'orca artifacts read <id-or-share-url> [--api-url <url>] [--output <path>] [--json]',
|
|
allowedFlags: [...GLOBAL_FLAGS, ...CLOUD_FLAGS, 'output'],
|
|
positionalArgs: ['id'],
|
|
examples: [
|
|
'orca artifacts read https://share.onorca.dev/a/abc123',
|
|
'orca artifacts read abc123 --json'
|
|
]
|
|
},
|
|
{
|
|
path: ['artifacts', 'share'],
|
|
summary: 'Share an HTML or Markdown file with your Orca account',
|
|
usage: 'orca artifacts share <file> [--api-url <url>] [--json]',
|
|
allowedFlags: [...GLOBAL_FLAGS, ...CLOUD_FLAGS, 'file'],
|
|
positionalArgs: ['file'],
|
|
examples: ['orca artifacts share ./report.html', 'orca artifacts share ./notes.md --json']
|
|
},
|
|
{
|
|
path: ['artifacts', 'update'],
|
|
summary: 'Update a file previously shared from this Orca profile',
|
|
usage: 'orca artifacts update <file> [--api-url <url>] [--json]',
|
|
allowedFlags: [...GLOBAL_FLAGS, ...CLOUD_FLAGS, 'file'],
|
|
positionalArgs: ['file']
|
|
},
|
|
{
|
|
path: ['artifacts', 'unshare'],
|
|
destructive: true,
|
|
summary: 'Delete the artifact associated with a previously shared file',
|
|
usage: 'orca artifacts unshare <file> [--api-url <url>] [--json]',
|
|
allowedFlags: [...GLOBAL_FLAGS, ...CLOUD_FLAGS, 'file'],
|
|
positionalArgs: ['file']
|
|
},
|
|
{
|
|
path: ['artifacts', 'list'],
|
|
summary: 'List artifacts owned by the signed-in Orca account',
|
|
usage: 'orca artifacts list [--cursor <cursor>] [--api-url <url>] [--json]',
|
|
allowedFlags: [...GLOBAL_FLAGS, ...CLOUD_FLAGS, 'cursor']
|
|
},
|
|
{
|
|
path: ['artifacts', 'delete'],
|
|
aliases: [['artifacts', 'rm']],
|
|
destructive: true,
|
|
summary: 'Delete an artifact owned by the signed-in Orca account',
|
|
usage: 'orca artifacts delete <id> [--api-url <url>] [--json]',
|
|
allowedFlags: [...GLOBAL_FLAGS, ...CLOUD_FLAGS, 'id'],
|
|
positionalArgs: ['id']
|
|
}
|
|
]
|