Cofounder CLI
Company Knowledge
Teach the company what it needs to know: import founder knowledge, manage Library files, and search everything through context search.
A company knows things two ways, and they serve different jobs:
- Knowledge: imported facts about the company: the pitch, the market, customer conversations, decisions. This is what agents pull in as context.
- Library: a shared file system for documents, uploads, generated artifacts, and scripts.
Import knowledge
Bulk import is a two-call move. The first call previews the parsed items and
writes nothing; the second (confirm: true on MCP, --confirm on
the CLI) writes them:
| MCP | CLI | API |
|---|---|---|
company_knowledge_import | cofounder company knowledge import | POST /cofounder-cli/v1/company/knowledge/import |
One catch: the input is a structured import report from a deep-research run
whose output ends with an Items to import section of numbered Item N
entries. A plain pitch doc won't parse.
cofounder company knowledge import --provider chatgpt \
--company-name "Acme Analytics" --report-markdown "$(cat report.md)"
# look over the previewed items, then run it again with --confirm
cofounder company knowledge import --provider chatgpt \
--company-name "Acme Analytics" --report-markdown "$(cat report.md)" \
--confirmProviders: chatgpt, claude, paperclip, openclaw, other. On MCP,
call company_knowledge_import once to preview, then again with
confirm: true.
Import the pitch, the audience, the constraints, and the competitors early. Your agent draws on it for every task that follows, so read the preview before you confirm.
The Library
The Library holds files rather than facts: specs, exports, decks, code,
anything an agent might read or run later. Files live at paths like
marketing/notes/plan.md, where the first folder is a department
(general, engineering, sales, marketing, design, research,
support, ops, finance, legal, or my_agents).
From a terminal, these commands work with local files and Library paths directly:
| CLI | What it does |
|---|---|
cofounder library list [path] | Browse folders and files in a department |
cofounder library files get <id-or-path> | Print a text file |
cofounder library write <local-file> <department/path> | Create or replace a text file from a local file |
cofounder library upload <local-file> <department/path> | Upload any file, including images and PDFs |
cofounder library download <id-or-path> --output <path> | Save a Library file locally; --force overwrites |
Agents use the same operations as tools:
| MCP | CLI | API |
|---|---|---|
library_files_list | cofounder library files list --q <name> | GET /cofounder-cli/v1/company/library/files |
library_files_get | cofounder library files get --file-id <id> | GET /cofounder-cli/v1/company/library/files/{file_id}/content |
library_search | cofounder library search --q <text> | GET /cofounder-cli/v1/company/library/files/search |
library_text_write | cofounder library text write --path <path> --content <text> | POST /cofounder-cli/v1/company/library/files/text |
library_files_content_publish | cofounder library files content publish --file-id <id> --base-revision-token <token> --content <text> | PATCH /cofounder-cli/v1/company/library/files/{file_id}/content |
library_files_delete | cofounder library files delete --path <path> | POST /cofounder-cli/v1/company/library/files/delete |
library_urls_ingest | cofounder library urls ingest --url <url> | POST /cofounder-cli/v1/company/library/ingest/url |
files list --q matches file names and details, not contents; use
search to look inside files. urls ingest saves a web page or document
by URL. files delete archives the file, so it no longer shows up in lists
or reads.
To edit a file without overwriting someone else's change, read it with
files get, which returns a version token alongside the text. Pass that
token to files content publish as --base-revision-token. If the file
changed since you read it, the edit is refused; read it again, or add
--overwrite-stale-content to replace it anyway.
Upload from an agent
cofounder library upload handles the whole upload for you. An agent
calling tools does it in three steps, for files up to 32 MiB:
| MCP | CLI | API |
|---|---|---|
library_uploads_start | cofounder library uploads start --department <dept> --filename <name> --mime-type <type> --size-bytes <n> | POST /cofounder-cli/v1/company/library/uploads |
library_uploads_finalize | cofounder library uploads finalize --ingest-id <id> --parts <json> | POST /cofounder-cli/v1/company/library/uploads/{ingest_id}/finalize |
library_uploads_cancel | cofounder library uploads cancel --ingest-id <id> | DELETE /cofounder-cli/v1/company/library/uploads/{ingest_id} |
start returns an upload URL. PUT the file's bytes to it, then call
finalize with the part number and ETag from each PUT; nothing is saved
until then. If the transfer fails, cancel frees the file name. Keep the
upload URL private; anyone holding it can write to it. The agent must be
able to read the file itself, so a hosted agent can't upload a path on
your machine.
Agents on MCP can also read Library files directly as resources. See MCP Beyond Tools.
Generate images and video
Generated images and videos are saved to the Library, and the CLI also downloads them to your current folder:
| MCP | CLI | API |
|---|---|---|
media_generate | cofounder media generate --kind image --prompt "<prompt>" | POST /cofounder-cli/v1/media |
media_generate | cofounder media generate --kind video --prompt "<prompt>" | POST /cofounder-cli/v1/media |
media_get | cofounder media get --job-id <job-id> | GET /cofounder-cli/v1/media/{job_id} |
cofounder media generate --kind image --prompt "flat illustration of a rocket, brand colors" --size 1536x1024 -o hero
cofounder media generate --kind video --prompt "slow pan across the product dashboard" --from ./screenshot.png --no-wait
cofounder media get --job-id <job-id>Generation costs money; the CLI prints each finished job's cost.
Images usually finish while the command waits. Video takes longer, so
start it with --no-wait and fetch it later with media get, which
downloads the files once the job is done. Use --reference (repeatable) for
style or identity reference images, and --from to animate a still image;
local files you pass are uploaded to the Library first. Each durable job
produces one output. The CLI generates an idempotency key and prints it after an
unclear failure; retry with that same --idempotency-key to recover the
original job instead of starting another. On MCP, pass kind: "image" or
kind: "video" and a caller-generated idempotency_key to media_generate.
Context search
When you're not sure where something lives, don't browse; search. One call finds what's relevant across knowledge, Library files, and company state, and it is the first place every agent should look:
| MCP | CLI | API |
|---|---|---|
context_search | cofounder context search | POST /cofounder-cli/v1/company/context/search |
cofounder context search --query "pricing decisions"Next steps
Once the company knows things, set up the systems it runs on: Managed Setup.