Command line

The cognitio command line: an interactive session in which Cognitio Infer works in a repository and confirms every change, plus answers, chat and summaries.

Updated 2026-09-21

Four to six sentences from Cognitio, written on request. Generated text: the page is the reference.

On this page

cognitio is a small command line for the Response series. Run it with no arguments inside a repository and it opens a session: a banner, a prompt, and Cognitio Infer working in that directory with six tools, reading and searching freely and asking before every file it writes and every command it runs. The conversation carries from task to task. The same binary also answers one question, keeps a plain chat, summarises a file, and runs a single task non-interactively for scripts. Everything goes through the Falcon API with a preview key; nothing runs a model locally.

It is a single Node.js package with no dependencies, first released with Cognitio Infer on 2026-09-21; version 0.2.0 brought the session and the light-terminal look. Node 20 or later is required.

Install #

The package is distributed from this site during the private preview; it is not on a public package registry.

bash
npm install -g https://falconlab.app/downloads/cognitio-0.2.3.tgz
cognitio config --key <the key>
cognitio

The key comes from the portal; config stores it, with the API base URL and your default model and effort, in ~/.config/cognitio/config.json (readable by you alone). The environment variables COGNITIO_API_KEY and COGNITIO_API_URL override the file, and COGNITIO_CONFIG_DIR moves it. cognitio config with no flags shows the current settings with the key redacted.

The session #

cognitio with no arguments is the session. Its look is made for a light terminal: ink-grey text on your background, one blue accent for the prompt () and the model's answers (), orange bullets () for tool calls with their output folded beneath (), a diff in green and red before every write, a spinner while the model thinks or works, and a status line after each task with steps, tokens and seconds. Colours switch off when the output is not a terminal or NO_COLOR is set.

CommandEffect
/helpThe commands
/yesToggle auto-approve for writes and commands (off by default; --yes starts it on)
/think then off, low, medium or highHow long Cognitio Infer reasons before each step
/model then cognitio or cognitio-inferWhich model answers
/reasoningShow or hide the thinking trace before each step (--reasoning starts it shown)
/clearForget the conversation so far
/costSteps and tokens used in this session
/quitLeave; Ctrl-D works too

Between tasks the harness keeps the conversation, so “now do the same for the other file” works; older tool output is folded and the oldest turns dropped before a request would exceed the model's window.

Commands #

CommandWhat it doesRoute
cognitioThe session described above.POST /v1/agent
cognitio "a question"One answer. Cognitio Infer at low thinking by default; the reasoning trace is printed dimmed before the answer.POST /v1/chat
cognitio chatA plain conversation in the terminal, the last eight turns sent as history; /quit or Ctrl-D leaves.POST /v1/chat
cognitio summarize <file>Cognitio's four-to-six-sentence summary of a file, or of standard input when no file is given; text over 12,000 characters is cut.POST /v1/summarize
cognitio code "a task"One task through the code harness with the session's renderer, then exit with 0 or 1; for scripts and CI.POST /v1/agent
cognitio config --key … [--base …] [--model …] [--think …]Stores settings; with no flags, shows them.

Flags on every command: --model (cognitio or cognitio-infer), --think (off, low, medium or high), --reasoning and --quiet (show or hide the trace), --key and --base for one run. --yes and --cwd DIR apply to the session and to code. All three routes are metered in the response bucket of the key; a session or code run costs one unit per step.

The code harness #

A task typed at the session prompt, or given to cognitio code "…", gives Cognitio Infer the repository — the current directory, or --cwd — and runs the tool loop the [/v1/agent](/docs/api#v1agent) route is built for. The model plans, calls tools, reads their results and continues until it calls done with a short report or runs out of steps.

ToolEffectAsks first
list_dirLists a directory; node_modules, .git, build output and virtual environments are skipped.no
read_fileReads a text file, truncated after 60,000 characters.no
searchCase-insensitive search across files, up to 200 matching lines.no
write_fileCreates or replaces a whole file; the diff is shown before the question.yes
runRuns a shell command in the repository root and returns its output, truncated; killed after two minutes.yes
doneEnds the run with a report.no

Every path is resolved inside the repository; a tool call that reaches outside it is refused and the refusal goes back to the model. A declined write or command is reported to the model as declined, so it can ask what to do instead or finish. --yes answers yes to everything, for a repository you can throw away or a task you have read in full; without it, each write shows its diff and each command is printed, and waits for a y. The loop stops after thirty steps.

text
❯ greet.mjs ignores its name argument; make it print hello, <name> and run it to check
  ✻ thought
● list_dir .
  ⎿  README.md
     greet.mjs
● read_file greet.mjs
  ⎿  const name = process.argv[2] || "world";
     console.log("hello");
◆ The script reads the name but never prints it. I will use it in the greeting and run the file.
● write_file greet.mjs (72 characters)
  greet.mjs
  - console.log("hello");
  + console.log(`hello, ${name}`);
? Replace greet.mjs (72 characters)? [y/N] y
  ⎿  wrote greet.mjs (72 characters)
● run $ node greet.mjs Ada
? Run: node greet.mjs Ada [y/N] y
  ⎿  exit 0
     hello, Ada
◆ greet.mjs now prints the name given on the command line; node greet.mjs Ada printed hello, Ada.
✓ 5 steps · 2,452 tokens · 31.0 s · cognitio-infer low

What the harness does not do: it has no memory between runs, no git operations of its own (ask for them as commands, which you confirm), and no judgement about a command's consequences beyond asking you. Cognitio Infer's Limits & safety chapter applies in full.

Errors and waiting #

The Falcon API's error codes are printed in plain words: a refused key points at cognitio config --key, an exhausted quota names the bucket, and a conversation over the model's window says so. When the Cognitio service is starting after idle, the command waits the seconds the API suggests and retries a few times before giving up, printing Cognitio is starting; waiting … s meanwhile. Retry guidance and the envelope are in API conventions.

Source #

The command line is part of the Falcon codebase; the tarball above is exactly npm pack of the cli/cognitio package, ten files, with its README. Its own test drives every command against a scripted Falcon API, including the session with confirmations answered from standard input, a second task that sees the first, the code harness through a list → read → write → run → done loop, a declined write and the loop-breaker.