{"_id":"@gcai/cli","name":"@gcai/cli","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@gcai/cli","version":"0.1.0","description":"Command-line client for the GC AI External API","license":"SEE LICENSE IN LICENSE","author":{"name":"General Counsel AI, Inc."},"homepage":"https://docs.gc.ai/api-reference","repository":{"type":"git","url":"git+https://github.com/GC-AI-Inc/gc-ai-cli.git"},"bugs":{"url":"https://github.com/GC-AI-Inc/gc-ai-cli/issues"},"keywords":["gc-ai","gcai","legal","cli","api"],"bin":{"gcai":"dist/index.js"},"main":"dist/index.js","publishConfig":{"access":"public"},"scripts":{"build":"tsup","prepublishOnly":"tsup","dev":"tsup --watch","start":"node dist/index.js","gcai":"tsx src/index.ts","codegen":"tsx codegen/generate.ts","refresh-spec":"tsx scripts/refresh-spec.ts","check-types":"tsc --noEmit","test":"vitest run","test:watch":"vitest","lint":"eslint src/ --max-warnings 0","clean":"rm -rf .turbo dist node_modules"},"dependencies":{"clipanion":"^3.2.1","typanion":"^3.14.0"},"devDependencies":{"@eslint/eslintrc":"^3.3.3","@eslint/js":"^9.39.2","@types/node":"^22.13.4","@typescript-eslint/eslint-plugin":"^8.53.1","eslint":"^9.39.2","eslint-plugin-jsdoc":"^62.3.1","eslint-plugin-oxfmt":"^0.1.1","eslint-plugin-unused-imports":"^4.3.0","openapi-typescript":"^7.13.0","oxfmt":"^0.40.0","tsup":"^8.5.1","tsx":"^4.19.4","typescript":"^5.7.2","typescript-eslint":"^8.53.1","vitest":"^4.0.18","yaml":"^2.7.0"},"packageManager":"pnpm@11.13.1","engines":{"node":">=22"},"_id":"@gcai/cli@0.1.0","gitHead":"19603aaf7ba558106847636cbd2f967f90c59ef6","_nodeVersion":"22.23.1","_npmVersion":"10.9.8","dist":{"integrity":"sha512-ildpNLnw1jtrzY/PwEAYkzQ/HLeTUUH+7Jn42vko5+lwvCZTHdIj3UC8zejbV6IF48yxD+S7HoGefm4mu6ux6g==","shasum":"53e50837b37ed3e52f3970ef349dc6894869ad0d","tarball":"https://registry.npmjs.org/@gcai/cli/-/cli-0.1.0.tgz","fileCount":5,"unpackedSize":617327,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDdkT6YYMTriIALB/ou2kvS1AceMGNfD9UckCiyASZDXAiEAy5nr8BFWLwiFqYslOO/Zl1mH3XfgeNSod1DAr83NIQw="}]},"_npmUser":{"name":"distrill","email":"hamilton.bh9@gmail.com"},"directories":{},"maintainers":[{"name":"gc-ai","email":"engineering@gc.ai"},{"name":"distrill","email":"hamilton.bh9@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cli_0.1.0_1786398331573_0.09268214623808713"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-10T21:45:31.408Z","0.1.0":"2026-08-10T21:45:31.758Z","modified":"2026-08-10T21:45:31.980Z"},"maintainers":[{"name":"gc-ai","email":"engineering@gc.ai"},{"name":"distrill","email":"hamilton.bh9@gmail.com"}],"description":"Command-line client for the GC AI External API","homepage":"https://docs.gc.ai/api-reference","keywords":["gc-ai","gcai","legal","cli","api"],"repository":{"type":"git","url":"git+https://github.com/GC-AI-Inc/gc-ai-cli.git"},"author":{"name":"General Counsel AI, Inc."},"bugs":{"url":"https://github.com/GC-AI-Inc/gc-ai-cli/issues"},"license":"SEE LICENSE IN LICENSE","readme":"# GC AI CLI\n\n`gcai` is the command-line client for the [GC AI](https://gc.ai) External API —\nupload documents, run playbooks against them, ask questions grounded in your\nknowledge base, and manage projects, folders, and skills from a terminal or a\nscript.\n\nThe command surface is **generated from the External API OpenAPI spec**, so it\nstays in sync with the API rather than drifting behind a hand-written wrapper.\n\nYou'll need a GC AI account. Run `gcai auth signup` if you don't have one.\n\n## Install\n\nNot yet published to a package registry. Until it is, run `gcai` from a checkout —\n[CONTRIBUTING.md](CONTRIBUTING.md#local-setup) has the setup.\n\nRequires **Node.js 22 or newer**.\n\n## Authenticate\n\n```sh\ngcai auth login\n```\n\nThis opens your browser to authorize the CLI and stores the resulting API key at\n`~/.config/gcai/config.json` (honoring `XDG_CONFIG_HOME`) with owner-only `0600`\npermissions. If the browser doesn't open, the URL is printed for you to paste.\n\n```sh\ngcai auth status    # show and verify the active credentials\ngcai auth logout    # remove stored credentials from this machine\n```\n\nFor CI and other non-interactive use, set `GCAI_API_KEY` instead of logging in.\n\n## Quickstart\n\nUpload a contract and run a playbook over it:\n\n```sh\ngcai files upload ./msa.pdf\n# → file id, e.g. file_abc123\n\ngcai playbooks list\n# → playbook ids\n\ngcai playbooks run pb_xyz789 --file-ids file_abc123\n```\n\nAsk a question about it:\n\n```sh\ngcai chat create \"What are the termination rights in this MSA?\" \\\n  --file-ids file_abc123\n```\n\nLong-running commands wait for the result by default. `gcai playbooks run` and\n`gcai chat create` poll until the job reaches a terminal state, then render it —\nso the command above simply returns the answer.\n\nIf you'd rather not block:\n\n```sh\ngcai chat create \"…\" --file-ids file_abc123 --async   # return the job envelope\ngcai jobs get job_123                                 # poll it yourself\ngcai jobs get job_123 --wait 60                       # or wait up to 60s\n\ngcai playbooks run pb_xyz789 --file-ids file_abc123 --timeout 300\n```\n\n## Output\n\nCommands print human-readable output by default. Pass `--json` for the raw API\nresponse — that's the one to use in scripts:\n\n```sh\ngcai projects list --json | jq -r '.data[].id'\n```\n\nEvery API command also accepts `--api-key` and `--base-url` to override the\nstored credentials and endpoint for a single invocation.\n\n## Configuration\n\nResolution order is **flag → environment variable → stored config → default**.\n\n| Variable | Purpose |\n| --- | --- |\n| `GCAI_API_KEY` | API key; skips the need for `gcai auth login` |\n| `GCAI_BASE_URL` | Point at a different API endpoint (defaults to production) |\n| `XDG_CONFIG_HOME` | Where the config file lives (defaults to `~/.config`) |\n\n## Commands\n\nPrint details for any command with `gcai <command> --help`. In the tables below,\n`<required>` and `[optional]` follow the usual convention, and `#` marks a value.\n`--json`, `--api-key`, and `--base-url` are omitted since every API command takes\nthem.\n\n### Auth\n\n| Command | Description |\n| --- | --- |\n| `gcai auth login` | Authenticate and store an API key |\n| `gcai auth logout` | Remove stored credentials from this machine |\n| `gcai auth signup` | Open the GC AI sign-up page in your browser |\n| `gcai auth status` | Show the active credentials and verify them |\n\n### Chat\n\n| Command | Description |\n| --- | --- |\n| `gcai chat create <message> [--file-ids #] [--playbook-ids #] [--skill-ids #] [--chat-id #] [--project-id #] [--async] [--timeout #]` | Create chat completion |\n| `gcai chat materialize <id> [--project-id #]` | Materialize an API chat |\n| `gcai chat search <q> [--limit #]` | Search chats |\n\n### Async jobs\n\n| Command | Description |\n| --- | --- |\n| `gcai jobs get <id> [--wait #]` | Get async job status |\n\n### Files\n\n| Command | Description |\n| --- | --- |\n| `gcai files get <id>` | Get file status |\n| `gcai files move <id> <--folder-id #>` | Move a file |\n| `gcai files search <q> [--scope #] [--project-id #]` | Search files |\n| `gcai files upload <file> [--folder-id #] [--project-id #] [--scope #]` | Upload a file |\n\n### Folders\n\n| Command | Description |\n| --- | --- |\n| `gcai folders children <id>` | List a folder's children |\n| `gcai folders create <name> [--description #] [--parent-folder-id #] [--scope #]` | Create a folder |\n| `gcai folders delete <id> [--recursive #]` | Delete a folder |\n| `gcai folders get <id>` | Get a folder |\n| `gcai folders list [--limit #] [--offset #] [--q #] [--scope #]` | List folders |\n| `gcai folders update <id> [--name #] [--description #] [--parent-folder-id #] [--is-access-controlled]` | Update a folder |\n\n### Playbooks\n\n| Command | Description |\n| --- | --- |\n| `gcai playbooks create <title> [--description #] [--guide #]` | Create a playbook |\n| `gcai playbooks delete <id>` | Delete a playbook |\n| `gcai playbooks duplicate <id>` | Duplicate a playbook |\n| `gcai playbooks get <id>` | Get a playbook |\n| `gcai playbooks list [--limit #] [--offset #]` | List playbooks |\n| `gcai playbooks run <id> <--file-ids #> [--review-mode #] [--representing-party #] [--check-ids #] [--async] [--timeout #]` | Run a playbook against uploaded files |\n| `gcai playbooks update <id> [--title #] [--description #] [--guide #]` | Update a playbook |\n\n### Playbook checks\n\n| Command | Description |\n| --- | --- |\n| `gcai playbooks checks create <id> <title> <--positions #> [--description #] [--importance #]` | Add a check to a playbook |\n| `gcai playbooks checks delete <id> <checkId>` | Remove a check from a playbook |\n| `gcai playbooks checks get <id> <checkId>` | Get a check |\n| `gcai playbooks checks list <id>` | List a playbook's checks |\n| `gcai playbooks checks reorder <id> <--check-ids #>` | Reorder a playbook's checks |\n| `gcai playbooks checks update <id> <checkId> [--title #] [--description #] [--importance #] [--positions #]` | Update a check |\n\n### Projects\n\n| Command | Description |\n| --- | --- |\n| `gcai projects create <name> [--description #] [--custom-instructions #] [--is-access-controlled]` | Create a project |\n| `gcai projects delete <id>` | Delete a project |\n| `gcai projects get <id>` | Get a project |\n| `gcai projects list [--limit #] [--offset #] [--search #]` | List projects |\n| `gcai projects update <id> [--name #] [--description #] [--custom-instructions #]` | Update a project |\n| `gcai projects star <id>` | Star a project |\n| `gcai projects unstar <id>` | Unstar a project |\n| `gcai projects attach-chat <id> <chatId>` | File a chat into a project |\n| `gcai projects attach-file <id> <fileId>` | Attach a file to a project |\n| `gcai projects attach-folder <id> <folderId>` | Attach a folder to a project |\n| `gcai projects detach-file <id> <fileId>` | Detach a file from a project |\n| `gcai projects detach-folder <id> <folderId>` | Detach a folder from a project |\n| `gcai projects chats <id> [--limit #] [--offset #]` | List chats in a project |\n| `gcai projects files <id> [--limit #] [--offset #]` | List files on a project |\n| `gcai projects folders <id> [--limit #] [--offset #]` | List folders linked to a project |\n\n### Skills\n\n| Command | Description |\n| --- | --- |\n| `gcai skills create <name> <--content #> [--description #] [--visibility #] [--file-ids #]` | Create a skill |\n| `gcai skills delete <id>` | Delete a skill |\n| `gcai skills get <id>` | Get a skill |\n| `gcai skills list [--limit #] [--offset #] [--q #]` | List skills |\n| `gcai skills update <id> [--name #] [--content #] [--description #] [--file-ids #]` | Update a skill |\n\n### Profiles\n\n| Command | Description |\n| --- | --- |\n| `gcai me` | Identify the caller |\n| `gcai profile get` | Get your personal profile |\n| `gcai profile update [--preferred-name #] [--role-title #] [--practice-areas #] [--custom-instructions #] …` | Update your personal profile |\n| `gcai company get` | Get the company profile |\n| `gcai company update [--name #] [--industry #] [--size #] [--location #] …` | Update the company profile |\n\n### Usage\n\n| Command | Description |\n| --- | --- |\n| `gcai usage get <--start-date #> <--end-date #> [--timezone #]` | Get usage summary |\n| `gcai usage credits <--start-date #> <--end-date #> [--timezone #]` | Get credit usage |\n\n### MCP\n\n| Command | Description |\n| --- | --- |\n| `gcai mcp credentials create` | Provision MCP client-credentials |\n\n### Utility\n\n| Command | Description |\n| --- | --- |\n| `gcai ping` | Health check |\n\n## Documentation\n\nFull API reference: **<https://docs.gc.ai/api-reference>**\n\n## Support\n\n- **Bugs and feature requests:** [open an issue](https://github.com/GC-AI-Inc/gc-ai-cli/issues).\n  Include `gcai --version`, your OS, the command you ran, and `--json` output\n  where relevant.\n- **Security issues:** see [SECURITY.md](SECURITY.md) — please don't file these\n  publicly.\n- **Account or billing questions:** support@gc.ai.\n\n## Contributing\n\nThis repository is source-available and **not accepting external pull requests** —\nsee [CONTRIBUTING.md](CONTRIBUTING.md) for the reasoning and for what\n*is* useful to send us. GC AI engineers will find the development setup there too.\n\n## License and disclaimer\n\nThe GC AI CLI is published by General Counsel AI, Inc. (\"GC AI\") under a\nproprietary, source-available license — see [LICENSE](LICENSE) — and is provided\n**as is, without warranty of any kind**.\n\nThe CLI is **not part of the \"Services\"** under any Service Agreement between you\nand GC AI. Any use of the GC AI platform through the CLI remains governed by\n<https://gc.ai/service-agreement> or <https://gc.ai/terms>, as applicable, and/or\nthe customer's Order Form.\n","readmeFilename":"README.md","_rev":"1-73f77145be7dcf2ac5db9ddafbf19548"}