@tigrisdata/cli 3.9.0 → 3.10.0

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.
Files changed (122) hide show
  1. package/README.md +50 -5
  2. package/dist/auth/iam.js +1 -1
  3. package/dist/auth/provider.js +1 -1
  4. package/dist/{chunk-ZBRCGJ6R.js → chunk-4FAKNMI5.js} +1 -1
  5. package/dist/{chunk-54KNZAI5.js → chunk-76VFN2EJ.js} +1 -1
  6. package/dist/chunk-7UKHARLH.js +10 -0
  7. package/dist/{chunk-LKNUDKJD.js → chunk-CEEDWOY2.js} +2 -2
  8. package/dist/{chunk-XHR75GDI.js → chunk-HAYPV4J6.js} +1 -1
  9. package/dist/{chunk-FKHFOOA3.js → chunk-IIF5VLQ7.js} +1 -1
  10. package/dist/{chunk-QUCEBYIQ.js → chunk-JUOJKZRI.js} +1 -1
  11. package/dist/{chunk-XUHRL6QY.js → chunk-MQEI5KKF.js} +1 -1
  12. package/dist/{chunk-WIJB3E2C.js → chunk-PNRZDYCK.js} +1 -1
  13. package/dist/{chunk-2TPTTPAT.js → chunk-R3KHIAWP.js} +1 -1
  14. package/dist/{chunk-AFES4NT6.js → chunk-RDJQLQQY.js} +1 -1
  15. package/dist/chunk-RH6Z22EN.js +1 -0
  16. package/dist/chunk-RQGIXHG5.js +5 -0
  17. package/dist/{chunk-E5CPKJ4N.js → chunk-TFXO4OXM.js} +1 -1
  18. package/dist/{chunk-N76NIM6R.js → chunk-UZIIZW33.js} +1 -1
  19. package/dist/chunk-V6JZFDRE.js +1 -0
  20. package/dist/{chunk-UUPTUOXD.js → chunk-ZTZF3OHU.js} +1 -1
  21. package/dist/cli-core.js +1 -1
  22. package/dist/cli.js +1 -1
  23. package/dist/constants.js +1 -1
  24. package/dist/index.js +1 -1
  25. package/dist/lib/access-keys/assign.js +1 -1
  26. package/dist/lib/access-keys/attach-policy.js +1 -1
  27. package/dist/lib/access-keys/create.js +1 -1
  28. package/dist/lib/access-keys/delete.js +1 -1
  29. package/dist/lib/access-keys/detach-policy.js +1 -1
  30. package/dist/lib/access-keys/get.js +1 -1
  31. package/dist/lib/access-keys/list-policies.js +1 -1
  32. package/dist/lib/access-keys/list.js +1 -1
  33. package/dist/lib/access-keys/rotate.js +1 -1
  34. package/dist/lib/buckets/create.js +1 -1
  35. package/dist/lib/buckets/delete.js +1 -1
  36. package/dist/lib/buckets/disable-snapshots.js +1 -1
  37. package/dist/lib/buckets/enable-snapshots.js +1 -1
  38. package/dist/lib/buckets/get.js +1 -1
  39. package/dist/lib/buckets/lifecycle/create.js +1 -1
  40. package/dist/lib/buckets/lifecycle/edit.js +1 -1
  41. package/dist/lib/buckets/lifecycle/list.js +1 -1
  42. package/dist/lib/buckets/lifecycle/shared.js +1 -1
  43. package/dist/lib/buckets/list.js +1 -1
  44. package/dist/lib/buckets/merge.js +1 -1
  45. package/dist/lib/buckets/migrate.js +1 -1
  46. package/dist/lib/buckets/rebase.js +1 -1
  47. package/dist/lib/buckets/restore.js +1 -1
  48. package/dist/lib/buckets/set-cors.js +1 -1
  49. package/dist/lib/buckets/set-locations.js +1 -1
  50. package/dist/lib/buckets/set-migration.js +1 -1
  51. package/dist/lib/buckets/set-notifications.js +1 -1
  52. package/dist/lib/buckets/set.js +1 -1
  53. package/dist/lib/bundle.js +1 -1
  54. package/dist/lib/configure/index.js +1 -1
  55. package/dist/lib/cp.js +1 -1
  56. package/dist/lib/credentials/test.js +1 -1
  57. package/dist/lib/iam/policies/create.js +1 -1
  58. package/dist/lib/iam/policies/delete.js +1 -1
  59. package/dist/lib/iam/policies/edit.js +1 -1
  60. package/dist/lib/iam/policies/get.js +1 -1
  61. package/dist/lib/iam/policies/link-key.js +1 -1
  62. package/dist/lib/iam/policies/list-keys.js +1 -1
  63. package/dist/lib/iam/policies/list.js +1 -1
  64. package/dist/lib/iam/policies/select-policy.js +1 -1
  65. package/dist/lib/iam/policies/unlink-key.js +1 -1
  66. package/dist/lib/iam/teams/create.js +1 -1
  67. package/dist/lib/iam/teams/edit.js +1 -1
  68. package/dist/lib/iam/teams/list.js +1 -1
  69. package/dist/lib/iam/teams/shared.js +1 -1
  70. package/dist/lib/iam/users/invite.js +1 -1
  71. package/dist/lib/iam/users/list.js +1 -1
  72. package/dist/lib/iam/users/remove.js +1 -1
  73. package/dist/lib/iam/users/revoke-invitation.js +1 -1
  74. package/dist/lib/iam/users/update-role.js +1 -1
  75. package/dist/lib/init/index.js +1 -1
  76. package/dist/lib/init/interactive.js +1 -1
  77. package/dist/lib/init/shared.js +1 -1
  78. package/dist/lib/login/credentials.js +1 -1
  79. package/dist/lib/login/oauth.js +1 -1
  80. package/dist/lib/login/select.js +1 -1
  81. package/dist/lib/logout.js +1 -1
  82. package/dist/lib/ls.js +1 -1
  83. package/dist/lib/mk.js +1 -1
  84. package/dist/lib/mv.js +1 -1
  85. package/dist/lib/objects/delete.js +1 -1
  86. package/dist/lib/objects/get.js +1 -1
  87. package/dist/lib/objects/info.js +1 -1
  88. package/dist/lib/objects/list-versions.js +4 -4
  89. package/dist/lib/objects/list.js +1 -1
  90. package/dist/lib/objects/purge.js +1 -0
  91. package/dist/lib/objects/put.js +1 -1
  92. package/dist/lib/objects/restore-deleted.js +1 -0
  93. package/dist/lib/objects/restore-info.js +1 -1
  94. package/dist/lib/objects/restore.js +1 -1
  95. package/dist/lib/objects/set-access.js +1 -1
  96. package/dist/lib/objects/set.js +1 -1
  97. package/dist/lib/organizations/create.js +1 -1
  98. package/dist/lib/organizations/list.js +1 -1
  99. package/dist/lib/organizations/select.js +1 -1
  100. package/dist/lib/presign.js +1 -1
  101. package/dist/lib/rm.js +1 -1
  102. package/dist/lib/snapshots/delete.js +1 -1
  103. package/dist/lib/snapshots/list.js +1 -1
  104. package/dist/lib/snapshots/take.js +1 -1
  105. package/dist/lib/stat.js +1 -1
  106. package/dist/lib/telemetry/disable.js +1 -1
  107. package/dist/lib/telemetry/enable.js +1 -1
  108. package/dist/lib/telemetry/status.js +1 -1
  109. package/dist/lib/touch.js +1 -1
  110. package/dist/lib/update.js +1 -1
  111. package/dist/lib/whoami.js +1 -1
  112. package/dist/specs.yaml +78 -2
  113. package/dist/utils/analytics.js +1 -1
  114. package/dist/utils/exit.js +1 -1
  115. package/dist/utils/telemetry.js +1 -1
  116. package/dist/utils/update-check.js +1 -1
  117. package/package.json +3 -3
  118. package/postinstall.cjs +6 -0
  119. package/dist/chunk-64FBY7Z6.js +0 -1
  120. package/dist/chunk-672QCRVD.js +0 -1
  121. package/dist/chunk-HCZGZVF3.js +0 -9
  122. package/dist/chunk-L6I5MSYU.js +0 -5
package/dist/specs.yaml CHANGED
@@ -1458,6 +1458,7 @@ commands:
1458
1458
  - "tigris objects list t3://my-bucket/images/"
1459
1459
  - "tigris objects list my-bucket --prefix images/"
1460
1460
  - "tigris objects list my-bucket --format json"
1461
+ - "tigris objects list my-bucket --deleted"
1461
1462
  messages:
1462
1463
  onStart: 'Listing objects...'
1463
1464
  onSuccess: 'Found {{count}} object(s)'
@@ -1490,15 +1491,19 @@ commands:
1490
1491
  - name: source
1491
1492
  description: List objects from a specific storage source on buckets with shadow migration enabled
1492
1493
  options: [tigris, shadow]
1494
+ - name: deleted
1495
+ description: List soft-deleted objects instead of live ones. Requires soft delete on the bucket. Not the recovery path for snapshot buckets — use "tigris objects list-versions" for those
1496
+ type: flag
1493
1497
  # list-versions
1494
1498
  - name: list-versions
1495
- description: List object versions and delete markers in a bucket (requires bucket versioning). Returns both arrays separately to match the S3 ListObjectVersions response
1499
+ description: List object versions and delete markers in a bucket (requires bucket versioning), or with --deleted the recoverable versions of soft-deleted objects. Returns both arrays separately to match the S3 ListObjectVersions response
1496
1500
  alias: lv
1497
1501
  examples:
1498
1502
  - "tigris objects list-versions my-bucket"
1499
1503
  - "tigris objects list-versions t3://my-bucket/logs/"
1500
1504
  - "tigris objects list-versions my-bucket --prefix images/"
1501
1505
  - "tigris objects list-versions my-bucket --format json"
1506
+ - "tigris objects list-versions my-bucket --prefix report.pdf --deleted"
1502
1507
  messages:
1503
1508
  onStart: 'Listing object versions...'
1504
1509
  onSuccess: 'Found {{versions}} version(s) and {{deleteMarkers}} delete marker(s)'
@@ -1528,6 +1533,9 @@ commands:
1528
1533
  description: Pagination marker — the key to start listing from (from a prior nextKeyMarker)
1529
1534
  - name: version-id-marker
1530
1535
  description: Pagination marker — the version id to start listing from (from a prior nextVersionIdMarker)
1536
+ - name: deleted
1537
+ description: List the recoverable versions of soft-deleted objects. Use the version id with "tigris objects restore-deleted" or "tigris objects purge"
1538
+ type: flag
1531
1539
  # get
1532
1540
  - name: get
1533
1541
  description: Download an object by key. Prints to stdout by default, or saves to a file with --output
@@ -1644,7 +1652,7 @@ commands:
1644
1652
  examples:
1645
1653
  - my-file.txt
1646
1654
  - name: version-id
1647
- description: Hard-delete a specific object version (requires bucket versioning). Targets a single key
1655
+ description: Hard-delete a specific object version (requires bucket versioning). Targets a single key. To destroy a soft-deleted version, use "tigris objects purge"
1648
1656
  - name: all-versions
1649
1657
  description: Hard-delete every version and delete marker for the given key(s). Mutually exclusive with --version-id
1650
1658
  type: flag
@@ -1802,6 +1810,74 @@ commands:
1802
1810
  description: Output format
1803
1811
  options: [json, table, xml]
1804
1812
  default: table
1813
+ # restore-deleted
1814
+ - name: restore-deleted
1815
+ description: Restore a soft-deleted object within its retention window. List recoverable objects with "tigris objects list --deleted", then pick a version with "tigris objects list-versions --deleted"
1816
+ alias: rd
1817
+ examples:
1818
+ - "tigris objects restore-deleted my-bucket report.pdf --version-id 1787749774802410496"
1819
+ - "tigris objects restore-deleted t3://my-bucket/report.pdf --version-id 1787749774802410496"
1820
+ messages:
1821
+ onStart: 'Restoring deleted object...'
1822
+ onSuccess: "Object '{{key}}' restored successfully"
1823
+ onFailure: 'Failed to restore deleted object'
1824
+ nextActions:
1825
+ - command: 'tigris ls {{bucket}}'
1826
+ description: 'List objects in the bucket'
1827
+ arguments:
1828
+ - name: bucket
1829
+ type: positional
1830
+ required: true
1831
+ description: Name of the bucket, or a full path (t3://bucket/key)
1832
+ examples:
1833
+ - my-bucket
1834
+ - t3://my-bucket/report.pdf
1835
+ - name: key
1836
+ type: positional
1837
+ description: Key of the object (omit if bucket contains the full path)
1838
+ examples:
1839
+ - report.pdf
1840
+ - name: version-id
1841
+ required: true
1842
+ description: The soft-deleted version to bring back, from "tigris objects list-versions --deleted"
1843
+ - name: format
1844
+ description: Output format
1845
+ options: [json, table, xml]
1846
+ default: table
1847
+ # purge
1848
+ - name: purge
1849
+ description: Permanently destroy a soft-deleted object version before its retention period expires. This cannot be undone — the version can no longer be restored with "tigris objects restore-deleted"
1850
+ alias: pg
1851
+ examples:
1852
+ - "tigris objects purge my-bucket report.pdf --version-id 1787749774802410496 --yes"
1853
+ - "tigris objects purge t3://my-bucket/report.pdf --version-id 1787749774802410496 --yes"
1854
+ messages:
1855
+ onStart: 'Purging deleted object...'
1856
+ onSuccess: "Purged version '{{versionId}}' of '{{key}}'"
1857
+ onFailure: 'Failed to purge deleted object'
1858
+ arguments:
1859
+ - name: bucket
1860
+ type: positional
1861
+ required: true
1862
+ description: Name of the bucket, or a full path (t3://bucket/key)
1863
+ examples:
1864
+ - my-bucket
1865
+ - t3://my-bucket/report.pdf
1866
+ - name: key
1867
+ type: positional
1868
+ description: Key of the object (omit if bucket contains the full path)
1869
+ examples:
1870
+ - report.pdf
1871
+ - name: version-id
1872
+ required: true
1873
+ description: The soft-deleted version to destroy, from "tigris objects list-versions --deleted"
1874
+ - name: force
1875
+ type: flag
1876
+ description: Skip confirmation prompts (alias for --yes)
1877
+ - name: format
1878
+ description: Output format
1879
+ options: [json, table, xml]
1880
+ default: table
1805
1881
 
1806
1882
  #########################
1807
1883
  # Manage access keys
@@ -1 +1 @@
1
- import{a,b,c,d,e,f}from"../chunk-UUPTUOXD.js";import"../chunk-G4OJTPSI.js";import"../chunk-64FBY7Z6.js";import"../chunk-BMWWPXMU.js";import"../chunk-APJUJ6TW.js";import"../chunk-672QCRVD.js";export{d as captureCommand,c as decodeTokenEmail,f as identifyOnLogin,a as isCI,e as trackCommand,b as usedFlags};
1
+ import{a,b,c,d,e,f}from"../chunk-ZTZF3OHU.js";import"../chunk-G4OJTPSI.js";import"../chunk-RH6Z22EN.js";import"../chunk-BMWWPXMU.js";import"../chunk-APJUJ6TW.js";import"../chunk-V6JZFDRE.js";export{d as captureCommand,c as decodeTokenEmail,f as identifyOnLogin,a as isCI,e as trackCommand,b as usedFlags};
@@ -1 +1 @@
1
- import{a,b,c,d}from"../chunk-FKHFOOA3.js";import"../chunk-D7WXNA2O.js";import"../chunk-NI4EYBQH.js";import"../chunk-AFES4NT6.js";import"../chunk-DV3LCXRH.js";import"../chunk-64FBY7Z6.js";import"../chunk-BMWWPXMU.js";import"../chunk-APJUJ6TW.js";import"../chunk-672QCRVD.js";export{a as exitWithError,b as failWithError,c as getSuccessNextActions,d as printNextActions};
1
+ import{a,b,c,d}from"../chunk-IIF5VLQ7.js";import"../chunk-D7WXNA2O.js";import"../chunk-NI4EYBQH.js";import"../chunk-RDJQLQQY.js";import"../chunk-DV3LCXRH.js";import"../chunk-RH6Z22EN.js";import"../chunk-BMWWPXMU.js";import"../chunk-APJUJ6TW.js";import"../chunk-V6JZFDRE.js";export{a as exitWithError,b as failWithError,c as getSuccessNextActions,d as printNextActions};
@@ -1 +1 @@
1
- import{a as c,b as d,c as e,d as f,e as g}from"../chunk-AFES4NT6.js";import"../chunk-64FBY7Z6.js";import{a,b}from"../chunk-BMWWPXMU.js";import"../chunk-APJUJ6TW.js";import"../chunk-672QCRVD.js";export{d as beforeSend,f as captureError,g as flushTelemetry,e as initTelemetry,c as invocationCommand,a as redactSecrets,b as scrubArgv};
1
+ import{a as c,b as d,c as e,d as f,e as g}from"../chunk-RDJQLQQY.js";import"../chunk-RH6Z22EN.js";import{a,b}from"../chunk-BMWWPXMU.js";import"../chunk-APJUJ6TW.js";import"../chunk-V6JZFDRE.js";export{d as beforeSend,f as captureError,g as flushTelemetry,e as initTelemetry,c as invocationCommand,a as redactSecrets,b as scrubArgv};
@@ -1 +1 @@
1
- import{a,b,c,d,e}from"../chunk-54KNZAI5.js";import"../chunk-G4OJTPSI.js";import"../chunk-64FBY7Z6.js";import"../chunk-672QCRVD.js";export{e as checkForUpdates,d as fetchLatestVersion,c as getUpdateCommand,b as isNewerVersion,a as readUpdateCache};
1
+ import{a,b,c,d,e}from"../chunk-76VFN2EJ.js";import"../chunk-G4OJTPSI.js";import"../chunk-RH6Z22EN.js";import"../chunk-V6JZFDRE.js";export{e as checkForUpdates,d as fetchLatestVersion,c as getUpdateCommand,b as isNewerVersion,a as readUpdateCache};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tigrisdata/cli",
3
- "version": "3.9.0",
3
+ "version": "3.10.0",
4
4
  "description": "Command line interface for Tigris object storage",
5
5
  "type": "module",
6
6
  "exports": {
@@ -46,8 +46,8 @@
46
46
  "jsonc-parser": "^3.3.1",
47
47
  "open": "^11.0.0",
48
48
  "yaml": "^2.8.3",
49
- "@tigrisdata/iam": "^2.2.2",
50
- "@tigrisdata/storage": "^3.18.0"
49
+ "@tigrisdata/iam": "^2.4.0",
50
+ "@tigrisdata/storage": "^3.20.0"
51
51
  },
52
52
  "devDependencies": {
53
53
  "tsx": "^4.21.0"
package/postinstall.cjs CHANGED
@@ -21,6 +21,12 @@ try {
21
21
  }
22
22
 
23
23
  // --- Show banner ---
24
+ // Skipped when the CLI is installing or updating itself (`tigris init` and
25
+ // `tigris update` set TIGRIS_NO_BANNER — see src/constants.ts). The banner goes
26
+ // straight to /dev/tty, so it escapes the parent's captured stdio and would be
27
+ // painted over the `init` wizard, and "To get started" is wrong for an update.
28
+ if (process.env.TIGRIS_NO_BANNER === '1') process.exit(0);
29
+
24
30
  try {
25
31
  const tty = openSync('/dev/tty', 'w');
26
32
 
@@ -1 +0,0 @@
1
- var e="3.9.0";export{e as a};
@@ -1 +0,0 @@
1
- var t="https://t3.storage.dev",s="https://iam.storageapi.dev",o="https://mgmt.storageapi.dev",p="https://registry.npmjs.org/@tigrisdata/cli/latest",e=216e5,T=36e5,r="https://c3a84c6a2811c557d70e42412cda4ffa@o4507410155896832.ingest.us.sentry.io/4511767771545600",_="phc_6a2zd9w9hGzIqYl527bL4dXk3Wz8J9pEHyXTwP1hHq4",a="https://ph.tigrisdata.com";export{t as a,s as b,o as c,p as d,e,T as f,r as g,_ as h,a as i};
@@ -1,9 +0,0 @@
1
- import{spawnSync as w}from"child_process";import{homedir as O}from"os";import{delimiter as j,join as e,normalize as _,sep as P}from"path";import{fileURLToPath as C}from"url";import{applyEdits as A,modify as I,parse as R}from"jsonc-parser";function G(){return{encoding:"utf8",...process.platform==="win32"?{shell:!0}:{}}}function M(){let r;try{r=C(import.meta.url)}catch{return null}let t=r.indexOf(`${P}node_modules${P}`);return t===-1?null:e(r.slice(0,t),"node_modules",".bin")}var T=/[\\/](?:_npx|dlx(?:-[^\\/]*)?)(?:[\\/]|$)/;function K(r,t=M()){let s=t===null?null:y(t);return(r??"").split(j).filter(n=>n!==""&&!T.test(n)&&(s===null||y(n)!==s)).join(j)}function y(r){let t=_(r),s=t.length>1?t.replace(/[\\/]+$/,""):t;return process.platform==="win32"?s.toLowerCase():s}function W(){let r=w("tigris",["--version"],G());if(r.error||r.status!==0||!r.stdout)return null;let t=r.stdout.trim().split(`
2
- `)[0].trim();return/^\d+\.\d+\.\d+/.test(t)?t:null}function V(r){return[...r?[]:["CLI - Global"],"MCP - Global","Skills - Project"].join(", ")}var c=O(),f=process.env.XDG_CONFIG_HOME?.trim()||e(c,".config"),E=process.env.CODEX_HOME?.trim()||e(c,".codex");function D(r,t){return process.platform==="darwin"?e(r,"Library","Application Support","Code","User"):process.platform==="win32"?e(t.APPDATA?.trim()||e(r,"AppData","Roaming"),"Code","User"):e(t.XDG_CONFIG_HOME?.trim()||e(r,".config"),"Code","User")}var $=D(c,process.env),S="saoudrizwan.claude-dev";function L(r,t){return e($,"globalStorage",r,"settings",t)}var Z="tigris",d="https://mcp.storage.dev/mcp";function q(r,t,s,n){let o=r?.trim()?r:"{}",l=[],i=R(o,l,{allowTrailingComma:!0});if(l.length>0)throw new Error("config is not valid JSON/JSONC");if(!b(i))throw new Error("config root is not an object");let p=i[t];if(p!==void 0&&!b(p))throw new Error(`"${t}" is not an object`);let a=b(p)&&Object.hasOwn(p,s),u=I(o,[t,s],n,{formattingOptions:{insertSpaces:!0,tabSize:2}});return{content:m(A(o,u)),replaced:a}}function b(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function Q(r,t,s,n){let l=[`[${t}.${s}]`,...Object.entries(n).map(([g,x])=>`${g} = ${JSON.stringify(x)}`)],i=r??"";if(N(i,t,s))throw new Error(`existing TOML defines ${t}.${s} inline`);let p=`${t}.${s}`,a=i.length?i.split(`
3
- `):[],u=a.findIndex(g=>k(g)===p);if(u!==-1){let g=u+1;for(;g<a.length&&k(a[g])===null;)g++;return a.splice(u,g-u,...l),{content:m(a.join(`
4
- `)),replaced:!0}}let h=i.length===0?"":m(i),v=h.length===0?"":`
5
- `;return{content:m(h+v+l.join(`
6
- `)),replaced:!1}}function m(r){return r.endsWith(`
7
- `)?r:`${r}
8
- `}function k(r){let t=r.trim().match(/^\[([^[\]]*)\]/);return t?t[1].split(".").map(s=>s.trim()).join("."):null}function N(r,t,s){let n="";for(let o of r.split(`
9
- `)){let l=o.trim();if(l===""||l.startsWith("#"))continue;let i=k(l);if(i!==null){n=i;continue}let p=l.indexOf("=");if(p===-1)continue;let a=l.slice(0,p).trim().replace(/^['"]|['"]$/g,"");if(n===t&&(a===s||a.startsWith(`${s}.`))||n===""&&(a===`${t}.${s}`||a.startsWith(`${t}.${s}.`)))return!0}return!1}var z={source:"custom",command:"npx",args:["-y","mcp-remote",d]},Y=[{id:"claude-code",label:"Claude Code",mcp:{format:"json",key:"mcpServers",entry:{type:"http",url:d},projectPath:".mcp.json",globalPath:e(c,".claude.json")},skillsAgent:"claude-code",skillsProjectDir:e(".claude","skills"),skillsGlobalDir:e(c,".claude","skills")},{id:"cursor",label:"Cursor",mcp:{format:"json",key:"mcpServers",entry:{url:d},projectPath:e(".cursor","mcp.json"),globalPath:e(c,".cursor","mcp.json")},skillsAgent:"cursor",skillsProjectDir:e(".agents","skills"),skillsGlobalDir:e(c,".cursor","skills")},{id:"vscode",label:"VS Code",mcp:{format:"json",key:"servers",entry:{type:"http",url:d},projectPath:e(".vscode","mcp.json")},skillsAgent:"github-copilot",skillsProjectDir:e(".agents","skills"),skillsGlobalDir:e(c,".copilot","skills")},{id:"windsurf",label:"Windsurf",mcp:{format:"json",key:"mcpServers",entry:{serverUrl:d},globalPath:e(c,".codeium","windsurf","mcp_config.json")},skillsAgent:"windsurf",skillsProjectDir:e(".windsurf","skills"),skillsGlobalDir:e(c,".codeium","windsurf","skills")},{id:"codex",label:"Codex",mcp:{format:"toml",key:"mcp_servers",entry:{url:d},projectPath:e(".codex","config.toml"),globalPath:e(E,"config.toml")},skillsAgent:"codex",skillsProjectDir:e(".agents","skills"),skillsGlobalDir:e(E,"skills")},{id:"antigravity-cli",label:"Antigravity CLI",mcp:{format:"json",key:"mcpServers",entry:{serverUrl:d},globalPath:e(c,".gemini","config","mcp_config.json")},skillsAgent:"antigravity-cli",skillsProjectDir:e(".agents","skills"),skillsGlobalDir:e(c,".gemini","antigravity-cli","skills")},{id:"cline",label:"Cline",mcp:{format:"json",key:"mcpServers",entry:{type:"streamableHttp",url:d,disabled:!1,autoApprove:[]},globalPath:L(S,"cline_mcp_settings.json"),createDirs:!1},skillsAgent:"cline",skillsProjectDir:e(".agents","skills"),skillsGlobalDir:e(c,".agents","skills")},{id:"zed",label:"Zed",mcp:{format:"json",key:"context_servers",entry:z,projectPath:e(".zed","settings.json"),globalPath:e(f,"zed","settings.json")},skillsAgent:"zed",skillsProjectDir:e(".agents","skills"),skillsGlobalDir:e(c,".agents","skills")},{id:"roo",label:"Roo Code",mcp:{format:"json",key:"mcpServers",entry:{type:"streamable-http",url:d},projectPath:e(".roo","mcp.json")},skillsAgent:"roo",skillsProjectDir:e(".roo","skills"),skillsGlobalDir:e(c,".roo","skills")},{id:"opencode",label:"opencode",mcp:{format:"json",key:"mcp",entry:{type:"remote",url:d,enabled:!0},projectPath:"opencode.json",globalPath:e(f,"opencode","opencode.json")},skillsAgent:"opencode",skillsProjectDir:e(".agents","skills"),skillsGlobalDir:e(f,"opencode","skills")}];function ee(r,t,s){let n=r.map(o=>t==="global"?o.skillsGlobalDir:e(s,o.skillsProjectDir));return[...new Set(n)]}function te(r,t,s){let n=r.mcp;if(!n)return null;let o=n.globalPath!==void 0,l=n.projectPath!==void 0,i=t==="global"?o?"global":l?"project":null:l?"project":o?"global":null;return i==="global"?{path:n.globalPath,scope:i}:i==="project"?{path:e(s,n.projectPath),scope:i}:null}function re(r){let{env:t,cwd:s,home:n,fileExists:o}=r,l=t.XDG_CONFIG_HOME?.trim()||e(n,".config"),i=[];return(t.CLAUDECODE==="1"||o(e(s,".claude"))||o(e(n,".claude.json")))&&i.push("claude-code"),(t.TERM_PROGRAM==="cursor"||o(e(s,".cursor"))||o(e(n,".cursor")))&&i.push("cursor"),(t.TERM_PROGRAM==="vscode"||o(e(s,".vscode")))&&i.push("vscode"),o(e(n,".codeium","windsurf"))&&i.push("windsurf"),(t.CODEX_HOME?.trim()||o(e(n,".codex")))&&i.push("codex"),(o(e(n,".gemini","antigravity-cli"))||o(e(n,".gemini","antigravity"))||o(e(n,".gemini","config")))&&i.push("antigravity-cli"),(o(e(n,".cline"))||o(e(D(n,t),"globalStorage",S)))&&i.push("cline"),(o(e(l,"zed"))||o("/Applications/Zed.app"))&&i.push("zed"),o(e(s,".roo"))&&i.push("roo"),(o(e(l,"opencode"))||o(e(s,"opencode.json"))||o(e(s,"opencode.jsonc")))&&i.push("opencode"),i}var H="github.com/tigrisdata/skills",ne=[{id:"tigris-agent-kit",label:"Agent kit",recommended:!0},{id:"tigris-object-operations",label:"Object operations",recommended:!0},{id:"tigris-bucket-management",label:"Bucket management",recommended:!0},{id:"tigris-sdk-guide",label:"SDK guide",recommended:!0},{id:"tigris-snapshots-forking",label:"Snapshots & forking",recommended:!1},{id:"tigris-snapshots-recovery",label:"Snapshots recovery",recommended:!1},{id:"tigris-lifecycle-management",label:"Lifecycle management",recommended:!1},{id:"tigris-security-access-control",label:"Security & access control",recommended:!1},{id:"tigris-s3-migration",label:"S3 migration",recommended:!1},{id:"tigris-static-assets",label:"Static assets",recommended:!1},{id:"tigris-image-optimization",label:"Image optimization",recommended:!1},{id:"tigris-egress-optimizer",label:"Egress optimizer",recommended:!1},{id:"tigris-backup-export",label:"Backup & export",recommended:!1},{id:"tigris-python-sdk",label:"Python SDK",recommended:!1}];function oe(r,t,s){let n=["-y","skills","add",H];for(let o of r)n.push("--skill",o);s&&n.push("-g");for(let o of t)n.push("-a",o);return n.push("--yes"),n}export{G as a,K as b,W as c,V as d,Z as e,d as f,q as g,Q as h,Y as i,ee as j,te as k,re as l,H as m,ne as n,oe as o};
@@ -1,5 +0,0 @@
1
- import{a as I,c as m,d as S,e as v,g as T,h as L,i as C,j as P,k as j,l as x,n as b,o as A}from"./chunk-HCZGZVF3.js";import{spawnSync as M}from"child_process";import{existsSync as d,mkdirSync as F,readFileSync as O,writeFileSync as V}from"fs";import{homedir as W}from"os";import{dirname as E}from"path";import*as t from"@clack/prompts";async function Q(){process.stdin.isTTY||(console.error("Run `tigris init` in an interactive terminal."),process.exit(1));let e=process.cwd(),i=W();t.intro("Connect Tigris to your AI coding agent");let n=x({env:process.env,cwd:e,home:i,fileExists:d}),r=await t.multiselect({message:"Which editor(s) should use Tigris?",options:C.map(l=>({value:l.id,label:l.label})),initialValues:n,required:!0});if(t.isCancel(r))return k();let s=C.filter(l=>r.includes(l.id)),a=m(),o=await t.select({message:"What would you like to install?",options:[{value:"defaults",label:"Defaults",hint:S(a!==null)},{value:"custom",label:"Customize installation"}],initialValue:"defaults"});if(t.isCancel(o))return k();let u="global",c="project";o==="custom"&&(u=await R("MCP server:","global"),c=await R("Agent skills:","project"));let g=b.map(l=>l.id);if(o==="custom"&&c!=="skip"){let l=await t.multiselect({message:"Which skills should your agent get? (space to toggle)",options:b.map(p=>({value:p.id,label:p.label})),initialValues:b.filter(p=>p.recommended).map(p=>p.id),required:!1});if(t.isCancel(l))return k();g=l}let f;if(a?f=N(a)||Y(a):f=G(),u==="skip")t.log.info("MCP server: skipped");else for(let l of s)_(l,u,e,i);if(c==="skip"||g.length===0)t.log.info("Agent skills: skipped");else{let l=s.map(h=>h.skillsAgent),p=A(g,l,c==="global"),w=$("npx",p,`Installing ${g.length} Tigris skill(s) (${c})`);if(w.ok)for(let h of P(s,c,e))t.log.success(`Skills \u2192 ${y(h,i)}`);else w.output&&t.log.error(w.output.split(`
2
- `).slice(-6).join(`
3
- `))}t.note(f?"tigris init --agent":"npx tigris init --agent","Paste this to your AI coding agent to finish setup"),t.outro("Your agent will authenticate with Tigris in-browser on first use.")}async function R(e,i){let n=await t.select({message:e,options:[{value:"global",label:"Global (available in all projects)"},{value:"project",label:"Project-level (this project only)"},{value:"skip",label:"Skip"}],initialValue:i});return t.isCancel(n)&&k(),n}function k(){t.cancel("Setup cancelled."),process.exit(1)}function y(e,i){return e.startsWith(i)?`~${e.slice(i.length)}`:e}function _(e,i,n,r){let s=e.mcp,a=j(e,i,n);if(!s||!a){t.log.warn(`${e.label}: no writable MCP config \u2014 skipped.`);return}let o=a.path;!d(o)&&o.endsWith(".json")&&d(`${o}c`)&&(o=`${o}c`);let u=E(o);if(s.createDirs===!1&&!d(E(u))){t.log.warn(`${e.label}: not installed \u2014 skipped.`);return}try{let c=d(o)?O(o,"utf8"):null,g=s.format==="toml"?L(c,s.key,v,H(s.entry)):T(c,s.key,v,s.entry);F(u,{recursive:!0}),V(o,g.content);let f=a.scope===i?"":` (${a.scope}-only)`;t.log.success(`${e.label}: MCP \u2192 ${y(o,r)}${f}`)}catch{t.log.error(`${e.label}: could not update ${y(o,r)} (incompatible or unwritable) \u2014 skipped.`)}}function H(e){let i={};for(let[n,r]of Object.entries(e))typeof r=="string"&&(i[n]=r);return i}function G(){let e=$("npm",["install","-g","@tigrisdata/cli","--ignore-scripts"],"Installing Tigris CLI (global)");return D(e)?m()===null?(t.log.warn("Tigris CLI installed but not on PATH \u2014 the agent handoff will use npx."),!1):!0:!1}function N(e){if(!D($("tigris",["update"],`Checking for Tigris CLI updates (${e})`)))return!1;let n=m();return n&&n!==e&&t.log.success(`Tigris CLI ${e} \u2192 ${n}`),!0}function Y(e){let i=M("tigris",["init","--agent"],I());return i.error||i.status!==0?(t.log.warn(`Tigris CLI ${e} predates \`init --agent\` \u2014 the agent handoff will use npx.`),!1):!0}function $(e,i,n){let r=t.spinner();r.start(n);let s=M(e,i,I());return s.status===0?(r.stop(`${n} \u2014 done`),{ok:!0}):(r.stop(`${n} \u2014 failed`),{ok:!1,output:(s.stderr||s.stdout||s.error?.message||"").trim()})}function D(e){return!e.ok&&e.output&&t.log.error(e.output.split(`
4
- `).slice(-6).join(`
5
- `)),e.ok}export{Q as a};