gnamiai
v0.4.0
Published
GnamiAI command-line client. Talk to your hosted agent from your terminal; let it read files, run shell commands, and edit code on your machine.
Readme
gnamiai — GnamiAI in your terminal
Talk to your hosted GnamiAI agent from PowerShell, bash, or zsh. Let it read your files, run shell commands, and edit code on your machine — all backed by your existing GnamiAI workspace (provider keys, skills, memory, integrations).
gnami login # one-time, paste an API key
gnami # interactive REPL
gnami "find the bug in src/api.ts and fix it" # one-shotInstall
Windows (PowerShell)
iwr -useb https://gnamiai.live/install.ps1 | iexmacOS / Linux
curl -fsSL https://gnamiai.live/install.sh | bashOr via npm directly
npm install -g gnamiaiRequires Node.js 18+.
Sign in
gnami loginOpens gnamiai.live/app#/settings in
your browser. Scroll to API keys, click New key, copy the
gnami_… string (shown once), paste it back into the terminal. The key
is stored in ~/.gnami/config.json (chmod 600 on Unix; user-only ACLs on
Windows). Nothing else is persisted locally — no chat history, no
caching, no telemetry.
To override at runtime (e.g. CI):
GNAMI_API_KEY=gnami_xxx gnami "your prompt here"Use
Three modes:
gnami # interactive REPL — chat back-and-forth
gnami "your prompt" # one-shot — print answer and exit
gnami chat "your prompt" # explicit one-shotIn the REPL, slash commands work:
/help show commands
/clear wipe local history (server-side memory unchanged)
/cwd show current working directory
/quit leave (Ctrl-D also works)What the agent can do on your machine
When the CLI is attached, the agent gets access to client-side tools that act on YOUR computer:
| Tool | What it does | Approval |
|---|---|---|
| read_file | Read a file's text content | Auto |
| list_dir | List directory entries | Auto |
| write_file | Create or overwrite a file | Prompt + diff |
| edit_file | Find/replace inside a file | Prompt + diff |
| bash | Run a shell command | Prompt |
By default, every write/edit/bash prompts you for approval (y/N).
Destructive bash patterns (rm -rf, sudo, curl … | sh, mkfs,
dd if=) always prompt, even with --yes.
Path safety: file ops are sandboxed to the current working directory by
default. Pass --no-sandbox to allow paths outside cwd.
gnami --yes "add a TypeScript test for the login flow"
↑ auto-approve safe writes/edits/bash
gnami --no-sandbox "read /etc/hosts and tell me what you see"
↑ allow paths outside cwdWeb-side tools (web_search, fetch_url, gmail_draft, etc.) work as
usual — they execute on the GnamiAI server, not on your machine.
Examples
Refactor a function
gnami "rename UserService.getById to UserService.findById everywhere"Run tests + diagnose a failure
gnami --yes "run npm test and fix the first error you see"Set up something new
gnami "scaffold a Vercel serverless function at api/hello.ts that returns the current time"Read + summarize
gnami "what does src/repl.ts do? explain in 5 bullet points"Environment variables
| Var | Default | Purpose |
|---|---|---|
| GNAMI_API_KEY | (saved key) | Override the saved Bearer token |
| GNAMI_BASE_URL | https://gnamiai.live | Override the API endpoint |
| NO_COLOR | (off) | Disable ANSI color output |
| GNAMI_DEBUG | (off) | Print full stack traces on error |
Uninstall
gnami logout # forget saved key
npm uninstall -g gnamiai~/.gnami/config.json is removed by gnami logout. The directory
itself stays so you can re-login without re-creating it.
Architecture (for the curious)
The CLI is a thin client:
you ─type→ gnami REPL ─POST→ /api/agent/turn ─→ GnamiAI agent
↑ │
│ │ emits client_execute action
│ ▼
└─execute locally──── { read_file, write_file, bash, … }
(with approval gates)
│
▼
POST follow-up turn with the tool result
│
▼
next iterationAll your provider keys, skills, subagents, memory, and integrations live server-side in your GnamiAI workspace. The CLI doesn't replicate any of that — it's just another window into the same agent that runs the web dashboard.
License
MIT.
