Install
charcoal --help.
Log in
~/.charcoal/credentials.json. If your account belongs to multiple organizations, the CLI prompts you to pick one.
For CI or any environment without a browser, pass an existing API key:
charcoal whoami.
Commands
Run any command with--help to see its full options.
| Command | Description |
|---|---|
charcoal login | Log in via browser, or --api-key for headless use |
charcoal logout | Clear stored credentials |
charcoal whoami | Show the current user and active organization |
charcoal org list | List organizations you belong to |
charcoal org switch | Switch the active organization |
charcoal org create | Create a new organization |
charcoal keys list | List API keys for the active organization |
charcoal keys create | Create a new API key |
charcoal keys delete | Delete an API key |
charcoal keys set | Use an existing API key as the active credential |
charcoal namespaces | List and manage namespaces |
charcoal docs upload | Upload JSON documents from a directory |
charcoal docs get | Fetch a document by ID |
charcoal search | Search documents in a namespace |
Upload documents
Upload a directory of JSON files to a namespace. Each file can contain a single document or an array of documents. The namespace is created if it doesn’t exist.Search
Provide anobjective (one sentence describing what you’re looking for) and context (a detailed natural language query):
--json to emit the raw response for piping into tools like jq: