{"_id":"@achiral/cli","_rev":"2-5125a1c5d217b00ca9a700f52c3e8309","name":"@achiral/cli","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.1":{"name":"@achiral/cli","version":"0.1.1","keywords":["achiral","ai","cli","assistant","agent","chiro","memory"],"license":"UNLICENSED","_id":"@achiral/cli@0.1.1","maintainers":[{"name":"achiral_md","email":"marvin@achiral.ai"}],"homepage":"https://achiral.ai","bugs":{"url":"https://github.com/Achiral-AI/achiral.cli/issues"},"bin":{"achiral":"dist/index.js"},"dist":{"shasum":"ccf01379cb4ae20c132d84c9250984ee3c9bacda","tarball":"https://registry.npmjs.org/@achiral/cli/-/cli-0.1.1.tgz","fileCount":4,"integrity":"sha512-S7PSTxhmFv6Fx84UJXXf3cW3+Zxgt6RvjfmtoO5wTVoby9IoFlRnl1XCbR7QvHj2OJSmD4e+eAcHcmrQ8/oYcw==","signatures":[{"sig":"MEUCIBIjdV7VZfhZnDdNGxNJ8cykiBLNz6Ex4qGe7PkPOFvuAiEAnKMMD5yqPyST+MA28YeBj5FnSTJqKRlUjTkXxWsbHvM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5258933},"type":"module","engines":{"bun":">=1.0.0","node":">=20.0.0"},"gitHead":"acfb0437ace374a38d131637a5b992c6071bb41d","scripts":{"dev":"bun run src/index.ts","lint":"eslint src","build":"bun build src/index.ts --outdir dist --entry-naming index.js --target node --sourcemap","prepack":"bun run build","pack:dry":"npm pack --dry-run","typecheck":"tsc --noEmit","build:prod":"bun build src/index.ts --outdir dist --entry-naming index.js --target node --minify"},"_npmUser":{"name":"achiral_md","email":"marvin@achiral.ai"},"repository":{"url":"git+https://github.com/Achiral-AI/achiral.cli.git","type":"git"},"_npmVersion":"11.6.2","description":"Developer CLI for Achiral – connect to your organisation's AI model engine","directories":{},"_nodeVersion":"24.6.0","dependencies":{"ink":"^5.2.0","chalk":"^5.3.0","react":"^18.3.1","commander":"^12.1.0","react-devtools-core":"^7.0.1","@commander-js/extra-typings":"^12.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.39.1","@eslint/js":"^9.39.1","typescript":"^5.5.0","@types/node":"^22.0.0","@types/react":"^18.3.3","typescript-eslint":"^8.50.0"},"_npmOperationalInternal":{"tmp":"tmp/cli_0.1.1_1788872114252_0.5880950686437931","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@achiral/cli","version":"0.1.2","description":"Developer CLI for Achiral – connect to your organisation's AI model engine","type":"module","license":"UNLICENSED","homepage":"https://achiral.ai","repository":{"type":"git","url":"git+https://github.com/Achiral-AI/achiral.cli.git"},"bugs":{"url":"https://github.com/Achiral-AI/achiral.cli/issues"},"keywords":["achiral","ai","cli","assistant","agent","chiro","memory"],"bin":{"achiral":"dist/index.js"},"scripts":{"dev":"bun run src/index.ts","build":"bun build src/index.ts --outdir dist --entry-naming index.js --target node --sourcemap","build:prod":"bun build src/index.ts --outdir dist --entry-naming index.js --target node --minify","prepack":"bun run build","pack:dry":"npm pack --dry-run","typecheck":"tsc --noEmit","lint":"eslint src"},"publishConfig":{"access":"public"},"dependencies":{"@commander-js/extra-typings":"^12.1.0","chalk":"^5.3.0","commander":"^12.1.0","ink":"^5.2.0","react":"^18.3.1","react-devtools-core":"^7.0.1"},"devDependencies":{"@eslint/js":"^9.39.1","@types/node":"^22.0.0","@types/react":"^18.3.3","eslint":"^9.39.1","typescript-eslint":"^8.50.0","typescript":"^5.5.0"},"engines":{"node":">=20.0.0","bun":">=1.0.0"},"gitHead":"5ad5ac8c444ba2782858253eebf3b8877f6e843c","_id":"@achiral/cli@0.1.2","_nodeVersion":"24.20.0","_npmVersion":"11.19.0","dist":{"integrity":"sha512-7pbNo3ZRDQ7dNL3izXKulrP8IcMovj73qVSjZhTY+SVGZvk2piLjYCVamkR+Pi3VnTwGcWc6uTnU6bydPrLTPA==","shasum":"cd765d9a5fb4090e9f891baa73c3848cd68b463b","tarball":"https://registry.npmjs.org/@achiral/cli/-/cli-0.1.2.tgz","fileCount":4,"unpackedSize":5258933,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDO9JRekKW2+LWucSmmQ5CCncXcio/PEYcALEDqw7yopgIgNShw/WvIzsT9nVz/ZnxlcHEhgxNgF/Q18/vPTsoQZ90="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:66544b01-e30f-4682-97c5-b961b0df53fe"}},"directories":{},"maintainers":[{"name":"achiral_md","email":"marvin@achiral.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cli_0.1.2_1788872798486_0.29506176799420025"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-08T12:55:13.980Z","modified":"2026-09-08T13:06:38.992Z","0.1.1":"2026-09-08T12:55:14.450Z","0.1.2":"2026-09-08T13:06:38.680Z"},"bugs":{"url":"https://github.com/Achiral-AI/achiral.cli/issues"},"license":"UNLICENSED","homepage":"https://achiral.ai","keywords":["achiral","ai","cli","assistant","agent","chiro","memory"],"repository":{"type":"git","url":"git+https://github.com/Achiral-AI/achiral.cli.git"},"description":"Developer CLI for Achiral – connect to your organisation's AI model engine","maintainers":[{"name":"achiral_md","email":"marvin@achiral.ai"}],"readme":"# achiral.cli\n\nDeveloper CLI for [Achiral](https://achiral.ai) — connect to your organisation's AI model engine from the terminal.\n\nChat with your organisation's shared intelligence (Chiro) or your personal EA directly from the command line. Supports interactive REPL mode, pipe-friendly headless mode, and session persistence across conversations.\n\n---\n\n## Prerequisites\n\n- **Node.js** 20+ to run the published CLI\n- **Bun** 1.0+ to build from source\n- An Achiral account with `developer` or `admin` role\n- An API token (generated from your Achiral dashboard)\n\n---\n\n## Installation\n\n### Option 1 — Install from npm\n\n```bash\nnpm install -g @achiral/cli\n```\n\nThis makes the `achiral` command available globally.\n\n### Option 2 — Install from source\n\n```bash\ngit clone https://github.com/Achiral-AI/achiral.cli.git\ncd achiral.cli\nbun install\nbun run build\nnpm link        # makes `achiral` available globally\n```\n\n### Option 3 — Run directly with Bun without installing\n\n```bash\ngit clone https://github.com/Achiral-AI/achiral.cli.git\ncd achiral.cli\nbun install\nbun run src/index.ts   # replaces the `achiral` command\n```\n\n---\n\n## Setup\n\n### 1. Generate an API token\n\n1. Sign in to your Achiral dashboard at `https://<your-workspace>.achiral.ai`\n2. Go to **Settings → API Keys**\n3. Click **Generate new key** — give it a name like `cli-local`\n4. Copy the token (it is only shown once)\n\n### 2. Log in\n\n```bash\nachiral login\n```\n\nYou will be prompted for:\n\n```\nWorkspace slug :  mycompany        # the subdomain before .achiral.ai\nAPI token      :  ach_sk_••••••••\n```\n\nOr pass them as flags to skip the prompts:\n\n```bash\nachiral login --workspace mycompany --token ach_sk_yourtoken\n```\n\nOn success, the CLI validates the token against your workspace, lists available assistants, and automatically sets the first active assistant as your default.\n\nCredentials are saved to `~/.achiral/credentials.json` with `600` permissions (owner read/write only).\n\n---\n\n## Connecting to your organisation's Chiro\n\n**Chiro** is your organisation's shared AI assistant. Unlike personal EAs which are assigned to individual team members, Chiro has organisation-wide context — it knows your team structure, company policies, document library, and recent organisational activity.\n\n### Find your Chiro's ID\n\n```bash\nachiral list\n```\n\nExample output:\n\n```\n  Assistants in mycompany.achiral.ai:\n\n  ● Chiro              (68a1b2c3d4e5f6a7b8c9d0e1)\n       type: org_shared  model: apertus-8b  status: active\n\n  ○ Alex's EA          (68a1b2c3d4e5f6a7b8c9d0e2)\n       type: employee_personal  model: apertus-8b  status: active\n```\n\nThe `●` marker indicates your current default. The `org_shared` type is Chiro.\n\n### Set Chiro as your default assistant\n\n```bash\nachiral use 68a1b2c3d4e5f6a7b8c9d0e1\n```\n\nThis saves the selection to `~/.achiral/config.json`. All subsequent `achiral` sessions will use Chiro unless overridden.\n\n### Start a session with Chiro\n\n```bash\nachiral\n```\n\nThe REPL header confirms the connected assistant:\n\n```\nachiral / mycompany · Chiro  #a7b8c9d0  ctrl+c to exit\n\nType a message to get started.\n> ▋\n```\n\nTo connect to Chiro for a single session without changing your default:\n\n```bash\nachiral --assistant 68a1b2c3d4e5f6a7b8c9d0e1\n```\n\n---\n\n## Usage\n\n### Interactive REPL\n\n```bash\nachiral                            # open REPL with your default assistant\nachiral \"summarise today's tasks\"  # send an opening message, then stay in REPL\nachiral --assistant <id>           # use a specific assistant for this session\nachiral --workspace acme           # override the saved workspace\n```\n\n**Keyboard shortcuts:**\n\n| Key | Action |\n|-----|--------|\n| `Enter` | Send message |\n| `Backspace` | Delete character |\n| `Ctrl+C` | Exit |\n\n### Headless / pipe mode\n\nUse `-p` to get a single response and exit — useful for scripts and shell pipelines:\n\n```bash\nachiral -p \"what is our refund policy?\"\n\n# Pipe output to a file\nachiral -p \"draft release notes for v2.4\" > release-notes.md\n\n# Chain with other tools\ngit diff HEAD~1 | achiral -p \"review this diff for security issues\"\n```\n\n### All commands\n\n```bash\nachiral                       # open interactive REPL\nachiral login                 # connect to a workspace\nachiral logout                # remove saved credentials\nachiral whoami                # show current workspace and active assistant\nachiral list                  # list all assistants in your workspace\nachiral use <assistant-id>    # set your default assistant\n```\n\n---\n\n## Local development (connecting to a local Achiral instance)\n\nIf you are running Achiral locally, pass `--dev` to use `http://` instead of `https://`:\n\n```bash\nachiral login --workspace localhost:3000 --token ach_sk_dev_token --dev\nachiral --dev\n```\n\n## Publishing\n\nBefore publishing the package to npm:\n\n```bash\nbun install\nbun run typecheck\nbun run lint\nbun run build\nnpm pack --dry-run\nnpm publish --access public --provenance\n```\n\nThe published package installs the `achiral` binary from `dist/index.js`.\nThe npm tarball is intentionally limited to the built CLI bundle, source map,\nREADME, and package metadata.\n\n---\n\n## Configuration files\n\nAll CLI state is stored under `~/.achiral/`:\n\n| File | Contents |\n|------|----------|\n| `credentials.json` | Workspace slug and API token (`chmod 600`) |\n| `config.json` | Default assistant ID and preferences |\n| `sessions/<workspace>__<assistantId>.json` | Last conversation ID per assistant |\n\nTo fully reset:\n\n```bash\nachiral logout\nrm -rf ~/.achiral/config.json ~/.achiral/sessions/\n```\n\n---\n\n## Coming soon\n\n**CORTEX** — always-on quality monitor that surfaces assistant drift and response health signals in the REPL header during your session.\n\n**SUBCONSCIOUS** — post-session reflective analysis that reviews recent conversations, identifies gaps in your assistant's business context, and proposes knowledge and persona improvements for your approval.\n\n```bash\nachiral subconscious   # coming in next release\n```\n\n---\n\n## Troubleshooting\n\n**`Not logged in. Run achiral login first.`**\nRun `achiral login` and provide your workspace slug and API token.\n\n**`No active assistants found in workspace`**\nYour workspace has no active assistants. Create one at your Achiral dashboard under **Assistants → New**.\n\n**`HTTP 401` or `HTTP 403`**\nYour token may have been revoked or expired. Run `achiral login` again with a fresh token.\n\n**`HTTP 404` on the assistant**\nThe saved default assistant ID may no longer exist. Run `achiral list` and then `achiral use <id>` to pick a new default.\n\n---\n\n## Licence\n\nProprietary — © Achiral AI. All rights reserved.\n","readmeFilename":"README.md"}