@gcai/cli
v0.1.0
Published
Command-line client for the GC AI External API
Readme
GC AI CLI
gcai is the command-line client for the GC AI External API —
upload documents, run playbooks against them, ask questions grounded in your
knowledge base, and manage projects, folders, and skills from a terminal or a
script.
The command surface is generated from the External API OpenAPI spec, so it stays in sync with the API rather than drifting behind a hand-written wrapper.
You'll need a GC AI account. Run gcai auth signup if you don't have one.
Install
Not yet published to a package registry. Until it is, run gcai from a checkout —
CONTRIBUTING.md has the setup.
Requires Node.js 22 or newer.
Authenticate
gcai auth loginThis opens your browser to authorize the CLI and stores the resulting API key at
~/.config/gcai/config.json (honoring XDG_CONFIG_HOME) with owner-only 0600
permissions. If the browser doesn't open, the URL is printed for you to paste.
gcai auth status # show and verify the active credentials
gcai auth logout # remove stored credentials from this machineFor CI and other non-interactive use, set GCAI_API_KEY instead of logging in.
Quickstart
Upload a contract and run a playbook over it:
gcai files upload ./msa.pdf
# → file id, e.g. file_abc123
gcai playbooks list
# → playbook ids
gcai playbooks run pb_xyz789 --file-ids file_abc123Ask a question about it:
gcai chat create "What are the termination rights in this MSA?" \
--file-ids file_abc123Long-running commands wait for the result by default. gcai playbooks run and
gcai chat create poll until the job reaches a terminal state, then render it —
so the command above simply returns the answer.
If you'd rather not block:
gcai chat create "…" --file-ids file_abc123 --async # return the job envelope
gcai jobs get job_123 # poll it yourself
gcai jobs get job_123 --wait 60 # or wait up to 60s
gcai playbooks run pb_xyz789 --file-ids file_abc123 --timeout 300Output
Commands print human-readable output by default. Pass --json for the raw API
response — that's the one to use in scripts:
gcai projects list --json | jq -r '.data[].id'Every API command also accepts --api-key and --base-url to override the
stored credentials and endpoint for a single invocation.
Configuration
Resolution order is flag → environment variable → stored config → default.
| Variable | Purpose |
| --- | --- |
| GCAI_API_KEY | API key; skips the need for gcai auth login |
| GCAI_BASE_URL | Point at a different API endpoint (defaults to production) |
| XDG_CONFIG_HOME | Where the config file lives (defaults to ~/.config) |
Commands
Print details for any command with gcai <command> --help. In the tables below,
<required> and [optional] follow the usual convention, and # marks a value.
--json, --api-key, and --base-url are omitted since every API command takes
them.
Auth
| Command | Description |
| --- | --- |
| gcai auth login | Authenticate and store an API key |
| gcai auth logout | Remove stored credentials from this machine |
| gcai auth signup | Open the GC AI sign-up page in your browser |
| gcai auth status | Show the active credentials and verify them |
Chat
| Command | Description |
| --- | --- |
| gcai chat create <message> [--file-ids #] [--playbook-ids #] [--skill-ids #] [--chat-id #] [--project-id #] [--async] [--timeout #] | Create chat completion |
| gcai chat materialize <id> [--project-id #] | Materialize an API chat |
| gcai chat search <q> [--limit #] | Search chats |
Async jobs
| Command | Description |
| --- | --- |
| gcai jobs get <id> [--wait #] | Get async job status |
Files
| Command | Description |
| --- | --- |
| gcai files get <id> | Get file status |
| gcai files move <id> <--folder-id #> | Move a file |
| gcai files search <q> [--scope #] [--project-id #] | Search files |
| gcai files upload <file> [--folder-id #] [--project-id #] [--scope #] | Upload a file |
Folders
| Command | Description |
| --- | --- |
| gcai folders children <id> | List a folder's children |
| gcai folders create <name> [--description #] [--parent-folder-id #] [--scope #] | Create a folder |
| gcai folders delete <id> [--recursive #] | Delete a folder |
| gcai folders get <id> | Get a folder |
| gcai folders list [--limit #] [--offset #] [--q #] [--scope #] | List folders |
| gcai folders update <id> [--name #] [--description #] [--parent-folder-id #] [--is-access-controlled] | Update a folder |
Playbooks
| Command | Description |
| --- | --- |
| gcai playbooks create <title> [--description #] [--guide #] | Create a playbook |
| gcai playbooks delete <id> | Delete a playbook |
| gcai playbooks duplicate <id> | Duplicate a playbook |
| gcai playbooks get <id> | Get a playbook |
| gcai playbooks list [--limit #] [--offset #] | List playbooks |
| gcai playbooks run <id> <--file-ids #> [--review-mode #] [--representing-party #] [--check-ids #] [--async] [--timeout #] | Run a playbook against uploaded files |
| gcai playbooks update <id> [--title #] [--description #] [--guide #] | Update a playbook |
Playbook checks
| Command | Description |
| --- | --- |
| gcai playbooks checks create <id> <title> <--positions #> [--description #] [--importance #] | Add a check to a playbook |
| gcai playbooks checks delete <id> <checkId> | Remove a check from a playbook |
| gcai playbooks checks get <id> <checkId> | Get a check |
| gcai playbooks checks list <id> | List a playbook's checks |
| gcai playbooks checks reorder <id> <--check-ids #> | Reorder a playbook's checks |
| gcai playbooks checks update <id> <checkId> [--title #] [--description #] [--importance #] [--positions #] | Update a check |
Projects
| Command | Description |
| --- | --- |
| gcai projects create <name> [--description #] [--custom-instructions #] [--is-access-controlled] | Create a project |
| gcai projects delete <id> | Delete a project |
| gcai projects get <id> | Get a project |
| gcai projects list [--limit #] [--offset #] [--search #] | List projects |
| gcai projects update <id> [--name #] [--description #] [--custom-instructions #] | Update a project |
| gcai projects star <id> | Star a project |
| gcai projects unstar <id> | Unstar a project |
| gcai projects attach-chat <id> <chatId> | File a chat into a project |
| gcai projects attach-file <id> <fileId> | Attach a file to a project |
| gcai projects attach-folder <id> <folderId> | Attach a folder to a project |
| gcai projects detach-file <id> <fileId> | Detach a file from a project |
| gcai projects detach-folder <id> <folderId> | Detach a folder from a project |
| gcai projects chats <id> [--limit #] [--offset #] | List chats in a project |
| gcai projects files <id> [--limit #] [--offset #] | List files on a project |
| gcai projects folders <id> [--limit #] [--offset #] | List folders linked to a project |
Skills
| Command | Description |
| --- | --- |
| gcai skills create <name> <--content #> [--description #] [--visibility #] [--file-ids #] | Create a skill |
| gcai skills delete <id> | Delete a skill |
| gcai skills get <id> | Get a skill |
| gcai skills list [--limit #] [--offset #] [--q #] | List skills |
| gcai skills update <id> [--name #] [--content #] [--description #] [--file-ids #] | Update a skill |
Profiles
| Command | Description |
| --- | --- |
| gcai me | Identify the caller |
| gcai profile get | Get your personal profile |
| gcai profile update [--preferred-name #] [--role-title #] [--practice-areas #] [--custom-instructions #] … | Update your personal profile |
| gcai company get | Get the company profile |
| gcai company update [--name #] [--industry #] [--size #] [--location #] … | Update the company profile |
Usage
| Command | Description |
| --- | --- |
| gcai usage get <--start-date #> <--end-date #> [--timezone #] | Get usage summary |
| gcai usage credits <--start-date #> <--end-date #> [--timezone #] | Get credit usage |
MCP
| Command | Description |
| --- | --- |
| gcai mcp credentials create | Provision MCP client-credentials |
Utility
| Command | Description |
| --- | --- |
| gcai ping | Health check |
Documentation
Full API reference: https://docs.gc.ai/api-reference
Support
- Bugs and feature requests: open an issue.
Include
gcai --version, your OS, the command you ran, and--jsonoutput where relevant. - Security issues: see SECURITY.md — please don't file these publicly.
- Account or billing questions: [email protected].
Contributing
This repository is source-available and not accepting external pull requests — see CONTRIBUTING.md for the reasoning and for what is useful to send us. GC AI engineers will find the development setup there too.
License and disclaimer
The GC AI CLI is published by General Counsel AI, Inc. ("GC AI") under a proprietary, source-available license — see LICENSE — and is provided as is, without warranty of any kind.
The CLI is not part of the "Services" under any Service Agreement between you and GC AI. Any use of the GC AI platform through the CLI remains governed by https://gc.ai/service-agreement or https://gc.ai/terms, as applicable, and/or the customer's Order Form.
