import"../../errors-pXKbCKbL.js";import"../../editor-BmJI32_P.js";import{r as e}from"../../format-a_tYXjv9.js";import{s as t}from"../../fsStore-BzLA1cBc.js";import"../../base-xqced3zT.js";import"../../config-Bphz_1Sc.js";import"../../template-Cpbt9qy8.js";import"../../xling-DyktHkvX.js";import"../../claudeDefault-B8XYzR_k.js";import{t as n}from"../../claude-F-aLoUUK.js";import"../../codex-BDB0z8Gw.js";import"../../gemini-CPA89gOH.js";import{t as r}from"../../dispatcher-1aCGdFHn.js";import{Args as i,Command as a,Flags as o}from"@oclif/core";import s from"node:path";import c from"node:fs";var l=class l extends a{static summary=`View the full configuration file`;static description=`
    Print the entire configuration file for the selected tool/scope.
    Use --json for structured output or --no-json for plain text.
  `;static examples=[`<%= config.bin %> <%= command.id %> --tool claude --scope user`,`<%= config.bin %> <%= command.id %> --tool codex --no-json`];static args={name:i.string({description:`Claude variant name (optional). Example: settings:get hxi`,required:!1})};static flags={tool:o.string({char:`t`,description:`AI CLI tool to manage`,options:[`claude`,`codex`,`gemini`,`xling`],default:`claude`}),scope:o.string({char:`s`,description:`Configuration scope`,options:[`user`,`project`,`local`,`system`],default:`user`})};async run(){let{args:t,flags:n}=await this.parse(l);try{let r=n.tool,i=n.scope,a=r===`claude`&&t.name?await this.#t(i,t.name):await this.#e(r,i);if(n.json){this.log(e({success:!0,data:a}));return}if(!a.exists){this.warn(`Config file not found: ${a.path}`);return}a.content?this.log(a.content):this.log(`File is empty.`)}catch(e){this.error(e.message,{exit:1})}}async#e(e,t){return(await new r().execute({tool:e,scope:t,action:`inspect`})).data}async#t(e,r){let i=new n;if(!i.validateScope(e))throw Error(`Invalid scope for Claude: ${e}`);let a=r.trim();if(!a||a===`default`)return this.#e(`claude`,e);let o=t(i.resolvePath(e)),l=s.dirname(o),u=this.#n(l,a)??s.join(l,`settings.${a}.json`);if(!c.existsSync(u))return{path:u,exists:!1};let d=c.statSync(u);return{path:u,exists:!0,content:c.readFileSync(u,`utf-8`),size:d.size,lastModified:d.mtime}}#n(e,t){let n=[`settings.${t}.json`,`settings-${t}.json`];for(let t of n){let n=s.join(e,t);if(c.existsSync(n))return n}return null}};export{l as default};