ℹ️Idioma

Esta página está em português. A versão em inglês é a referência principal quando houver divergência.

CLI Command Reference

cfactory acp

start ACP (Agent Client Protocol) server

Opções:
  --help         Exibe ajuda  [booleano]
  --version      Exibe a versão  [booleano]
  --port         port to listen on  [número] [padrão: 0]
  --hostname     hostname to listen on  [string] [padrão: "127.0.0.1"]
  --mdns         enable mDNS service discovery (defaults hostname to 0.0.0.0)  [booleano] [padrão: false]
  --mdns-domain  custom domain name for mDNS service (default: cfactory.local)  [string] [padrão: "cfactory.local"]
  --cors         additional domains to allow for CORS  [array] [padrão: []]
  --cwd          working directory  [string] [padrão: "."]

cfactory mcp

manage MCP (Model Context Protocol) servers

Comandos:
  cfactory mcp add            add an MCP server
  cfactory mcp list           list MCP servers and their status  [sinônimos: ls]
  cfactory mcp auth [name]    authenticate with an OAuth-enabled MCP server
  cfactory mcp logout [name]  remove OAuth credentials for an MCP server
  cfactory mcp debug <name>   debug OAuth connection for an MCP server

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory mcp add

add an MCP server

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory mcp list

list MCP servers and their status

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory mcp auth

authenticate with an OAuth-enabled MCP server

Comandos:
  cfactory mcp auth list  list OAuth-capable MCP servers and their auth status  [sinônimos: ls]

Positionals:
  --name  name of the MCP server  [string]

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory mcp auth list

list OAuth-capable MCP servers and their auth status

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory mcp logout

remove OAuth credentials for an MCP server

Positionals:
  --name  name of the MCP server  [string]

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory mcp debug

debug OAuth connection for an MCP server

Positionals:
  --name  name of the MCP server  [string]

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory [project]

start cfactory tui

Positionals:
      --project  path to start cfactory in  [string]

Opções:
      --help         Exibe ajuda  [booleano]
      --version      Exibe a versão  [booleano]
      --port         port to listen on  [número] [padrão: 0]
      --hostname     hostname to listen on  [string] [padrão: "127.0.0.1"]
      --mdns         enable mDNS service discovery (defaults hostname to 0.0.0.0)  [booleano] [padrão: false]
      --mdns-domain  custom domain name for mDNS service (default: cfactory.local)  [string] [padrão: "cfactory.local"]
      --cors         additional domains to allow for CORS  [array] [padrão: []]
  -m, --model        model to use in the format of provider/model  [string]
  -c, --continue     continue the last session  [booleano]
  -s, --session      session id to continue  [string]
      --fork         fork the session when continuing (use with --continue or --session)  [booleano]
      --cloud-fork   fetch session from cloud and continue locally (use with --session)  [booleano]
      --prompt       prompt to use  [string]
      --agent        agent to use  [string]

cfactory attach

attach to a running cfactory server

Positionals:
      --url  http://localhost:4096  [string]

Opções:
      --help        Exibe ajuda  [booleano]
      --version     Exibe a versão  [booleano]
      --dir         directory to run in  [string]
  -c, --continue    continue the last session  [booleano]
  -s, --session     session id to continue  [string]
      --fork        fork the session when continuing (use with --continue or --session)  [booleano]
      --cloud-fork  fetch session from cloud and continue locally (use with --session)  [booleano]
  -p, --password    basic auth password (defaults to CFACTORY_SERVER_PASSWORD)  [string]
  -u, --username    basic auth username (defaults to CFACTORY_SERVER_USERNAME or 'cfactory')  [string]

cfactory run

run cfactory with a message

Positionals:
      --message  message to send  [string] [padrão: []]

Opções:
      --help                          Exibe ajuda  [booleano]
      --version                       Exibe a versão  [booleano]
      --command                       the command to run, use message for args  [string]
  -c, --continue                      continue the last session  [booleano]
  -s, --session                       session id to continue  [string]
      --fork                          fork the session before continuing (requires --continue or --session)  [booleano]
      --cloud-fork                    fetch session from cloud and continue locally (use with --session)  [booleano]
      --share                         share the session  [booleano]
  -m, --model                         model to use in the format of provider/model  [string]
      --agent                         agent to use  [string]
      --format                        format: default (formatted) or json (raw JSON events)  [string] [opções: "default", "json"] [padrão: "default"]
  -f, --file                          file(s) to attach to message  [array]
      --title                         title for the session (uses truncated prompt if no value provided)  [string]
      --attach                        attach to a running cfactory server (e.g., http://localhost:4096)  [string]
  -p, --password                      basic auth password (defaults to CFACTORY_SERVER_PASSWORD)  [string]
  -u, --username                      basic auth username (defaults to CFACTORY_SERVER_USERNAME or 'cfactory')  [string]
      --dir                           directory to run in, path on remote server if attaching  [string]
      --port                          port for the local server (defaults to random port if no value provided)  [número]
      --variant                       model variant (provider-specific reasoning effort, e.g., high, max, minimal)  [string]
      --thinking                      show thinking blocks  [booleano]
  -i, --interactive                   run in direct interactive split-footer mode  [booleano] [padrão: false]
      --dangerously-skip-permissions  auto-approve permissions that are not explicitly denied (dangerous!)  [booleano] [padrão: false]
      --auto                          auto-approve all permissions (for autonomous/pipeline usage)  [booleano] [padrão: false]
      --demo                          enable direct interactive demo slash commands; pass one as the message to run it immediately  [booleano] [padrão: false]

cfactory debug

debugging and troubleshooting tools

Comandos:
  cfactory debug config        show resolved configuration
  cfactory debug lsp           LSP debugging utilities
  cfactory debug rg            ripgrep debugging utilities
  cfactory debug file          file system debugging utilities
  cfactory debug scrap         list all known projects
  cfactory debug skill         list all available skills
  cfactory debug snapshot      snapshot debugging utilities
  cfactory debug startup       print startup timing
  cfactory debug agent <name>  show agent configuration details
  cfactory debug info          show debug information
  cfactory debug paths         show global paths (data, config, cache, state)
  cfactory debug wait          wait indefinitely (for debugging)

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory debug config

show resolved configuration

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory debug lsp

LSP debugging utilities

Comandos:
  cfactory debug lsp diagnostics <file>      get diagnostics for a file
  cfactory debug lsp symbols <query>         search workspace symbols
  cfactory debug lsp document-symbols <uri>  get symbols from a document

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory debug lsp diagnostics

get diagnostics for a file

Positionals:
  --file  [string]

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory debug lsp symbols

search workspace symbols

Positionals:
  --query  [string]

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory debug lsp document-symbols

get symbols from a document

Positionals:
  --uri  [string]

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory debug rg

ripgrep debugging utilities

Comandos:
  cfactory debug rg tree              show file tree using ripgrep
  cfactory debug rg files             list files using ripgrep
  cfactory debug rg search <pattern>  search file contents using ripgrep

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory debug rg tree

show file tree using ripgrep

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]
  --limit  [número]

cfactory debug rg files

list files using ripgrep

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]
  --query    Filter files by query  [string]
  --glob     Glob pattern to match files  [string]
  --limit    Limit number of results  [número]
search file contents using ripgrep

Positionals:
  --pattern  Search pattern  [string]

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]
  --glob     File glob patterns  [array]
  --limit    Limit number of results  [número]

cfactory debug file

file system debugging utilities

Comandos:
  cfactory debug file read <path>     read file contents as JSON
  cfactory debug file status          show file status information
  cfactory debug file list <path>     list files in a directory
  cfactory debug file search <query>  search files by query
  cfactory debug file tree [dir]      show directory tree

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory debug file read

read file contents as JSON

Positionals:
  --path  File path to read  [string]

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory debug file status

show file status information

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory debug file list

list files in a directory

Positionals:
  --path  File path to list  [string]

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]
search files by query

Positionals:
  --query  Search query  [string]

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory debug file tree

show directory tree

Positionals:
  --dir  Directory to tree  [string] [padrão: "."]

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory debug scrap

list all known projects

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory debug skill

list all available skills

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory debug snapshot

snapshot debugging utilities

Comandos:
  cfactory debug snapshot track         track current snapshot state
  cfactory debug snapshot patch <hash>  show patch for a snapshot hash
  cfactory debug snapshot diff <hash>   show diff for a snapshot hash

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory debug snapshot track

track current snapshot state

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory debug snapshot patch

show patch for a snapshot hash

Positionals:
  --hash  hash  [string]

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory debug snapshot diff

show diff for a snapshot hash

Positionals:
  --hash  hash  [string]

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory debug startup

print startup timing

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory debug agent

show agent configuration details

Positionals:
  --name  Agent name  [string]

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]
  --tool     Tool id to execute  [string]
  --params   Tool params as JSON or a JS object literal  [string]

cfactory debug info

show debug information

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory debug paths

show global paths (data, config, cache, state)

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory debug wait

wait indefinitely (for debugging)

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory auth

manage AI providers and credentials

Comandos:
  cfactory auth list         list providers and credentials  [sinônimos: ls]
  cfactory auth login [url]  log in to a provider
  cfactory auth logout       log out from a configured provider

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory auth list

list providers and credentials

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory auth login

log in to a provider

Positionals:
      --url  cfactory auth provider  [string]

Opções:
      --help      Exibe ajuda  [booleano]
      --version   Exibe a versão  [booleano]
  -p, --provider  provider id or name to log in to (skips provider selection)  [string]
  -m, --method    login method label (skips method selection)  [string]

cfactory auth logout

log out from a configured provider

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory agent

manage agents

Comandos:
  cfactory agent create  create a new agent
  cfactory agent list    list all available agents

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory agent create

create a new agent

Opções:
      --help                  Exibe ajuda  [booleano]
      --version               Exibe a versão  [booleano]
      --path                  directory path to generate the agent file  [string]
      --description           what the agent should do  [string]
      --mode                  agent mode  [string] [opções: "all", "primary", "subagent"]
      --permissions, --tools  comma-separated list of permissions to allow (default: all). Available: "bash, read, edit, glob, grep, webfetch, task, todowrite, websearch, lsp, skill"  [string]
  -m, --model                 model to use in the format of provider/model  [string]

cfactory agent list

list all available agents

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory upgrade

upgrade cfactory to the latest or a specific version

Positionals:
      --target  version to upgrade to, for ex '0.1.48' or 'v0.1.48'  [string]

Opções:
      --help     Exibe ajuda  [booleano]
      --version  Exibe a versão  [booleano]
  -m, --method   installation method to use  [string] [opções: "curl", "npm", "pnpm", "bun", "brew", "choco", "scoop"]

cfactory uninstall

uninstall cfactory and remove all related files

Opções:
      --help         Exibe ajuda  [booleano]
      --version      Exibe a versão  [booleano]
  -c, --keep-config  keep configuration files  [booleano] [padrão: false]
  -d, --keep-data    keep session data and snapshots  [booleano] [padrão: false]
      --dry-run      show what would be removed without removing  [booleano] [padrão: false]
  -f, --force        skip confirmation prompts  [booleano] [padrão: false]

cfactory serve

starts a headless cfactory server

Opções:
  --help         Exibe ajuda  [booleano]
  --version      Exibe a versão  [booleano]
  --port         port to listen on  [número] [padrão: 0]
  --hostname     hostname to listen on  [string] [padrão: "127.0.0.1"]
  --mdns         enable mDNS service discovery (defaults hostname to 0.0.0.0)  [booleano] [padrão: false]
  --mdns-domain  custom domain name for mDNS service (default: cfactory.local)  [string] [padrão: "cfactory.local"]
  --cors         additional domains to allow for CORS  [array] [padrão: []]

cfactory models

list all available models

Positionals:
  --provider  provider ID to filter models by  [string]

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]
  --verbose  use more verbose model output (includes metadata like costs)  [booleano]
  --refresh  refresh the models cache from models.dev  [booleano]

cfactory roll-call

batch-test text models matching a filter for connectivity and latency

Positionals:
  --filter  regex to filter models by provider/modelID (required)  [string]

Opções:
  --help      Exibe ajuda  [booleano]
  --version   Exibe a versão  [booleano]
  --prompt    Prompt to send to each model  [string] [padrão: "Hello"]
  --timeout   Timeout for each model call in milliseconds  [número] [padrão: 25000]
  --parallel  Number of parallel model calls  [número] [padrão: 5]
  --verbose   Show verbose output  [booleano] [padrão: false]
  --quiet     Suppress progress and decoration  [booleano] [padrão: false]
  --output    Output format (table, json, or md)  [string] [opções: "table", "json", "md"] [padrão: "table"]

cfactory profile

show CFactory account profile

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]
  --json     output profile as JSON  [booleano] [padrão: false]

cfactory stats

show token usage and cost statistics

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]
  --days     show stats for the last N days (default: all time)  [número]
  --tools    number of tools to show (default: all)  [número]
  --models   show model statistics (default: hidden). Pass a number to show top N, otherwise shows all
  --project  filter by project (default: all projects, empty string: current project)  [string]

cfactory export

export session data as JSON

Positionals:
  --sessionID  session id to export  [string]

Opções:
  --help      Exibe ajuda  [booleano]
  --version   Exibe a versão  [booleano]
  --sanitize  redact sensitive transcript and file data  [booleano]

cfactory import

import session data from JSON file or URL

Positionals:
  --file  path to JSON file or share URL  [string]

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory pr

fetch and checkout a GitHub PR branch, then run cfactory

Positionals:
  --number  PR number to checkout  [número]

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory session

manage sessions

Comandos:
  cfactory session list                list sessions
  cfactory session delete <sessionID>  delete a session

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory session list

list sessions

Opções:
      --help       Exibe ajuda  [booleano]
      --version    Exibe a versão  [booleano]
  -n, --max-count  limit to N most recent sessions  [número]
      --format     output format  [string] [opções: "table", "json"] [padrão: "table"]
  -a, --all        list sessions from all projects  [booleano] [padrão: false]
  -s, --search     filter sessions by title  [string]

cfactory session delete

delete a session

Positionals:
  --sessionID  session ID to delete  [string]

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory remote

enable remote connection for real-time session relay

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory daemon

manage the local cfactory daemon

Comandos:
  cfactory daemon start    start the local cfactory daemon
  cfactory daemon status   show local cfactory daemon status
  cfactory daemon stop     stop the local cfactory daemon
  cfactory daemon restart  restart the local cfactory daemon

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory daemon start

start the local cfactory daemon

Opções:
  --help         Exibe ajuda  [booleano]
  --version      Exibe a versão  [booleano]
  --port         port to listen on  [número] [padrão: 0]
  --hostname     hostname to listen on  [string] [padrão: "127.0.0.1"]
  --mdns         enable mDNS service discovery (defaults hostname to 0.0.0.0)  [booleano] [padrão: false]
  --mdns-domain  custom domain name for mDNS service (default: cfactory.local)  [string] [padrão: "cfactory.local"]
  --cors         additional domains to allow for CORS  [array] [padrão: []]
  --json         print daemon details as JSON  [booleano]

cfactory daemon status

show local cfactory daemon status

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]
  --json     print daemon details as JSON  [booleano]

cfactory daemon stop

stop the local cfactory daemon

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]
  --json     print daemon details as JSON  [booleano]

cfactory daemon restart

restart the local cfactory daemon

Opções:
  --help         Exibe ajuda  [booleano]
  --version      Exibe a versão  [booleano]
  --port         port to listen on  [número] [padrão: 0]
  --hostname     hostname to listen on  [string] [padrão: "127.0.0.1"]
  --mdns         enable mDNS service discovery (defaults hostname to 0.0.0.0)  [booleano] [padrão: false]
  --mdns-domain  custom domain name for mDNS service (default: cfactory.local)  [string] [padrão: "cfactory.local"]
  --cors         additional domains to allow for CORS  [array] [padrão: []]
  --json         print daemon details as JSON  [booleano]

cfactory console

open the local CFactory Console

Opções:
  --help         Exibe ajuda  [booleano]
  --version      Exibe a versão  [booleano]
  --port         port to listen on  [número] [padrão: 0]
  --hostname     hostname to listen on  [string] [padrão: "127.0.0.1"]
  --mdns         enable mDNS service discovery (defaults hostname to 0.0.0.0)  [booleano] [padrão: false]
  --mdns-domain  custom domain name for mDNS service (default: cfactory.local)  [string] [padrão: "cfactory.local"]
  --cors         additional domains to allow for CORS  [array] [padrão: []]

cfactory db

database tools

Comandos:
  cfactory db [query]     open an interactive sqlite3 shell or run a query  [default]
  cfactory db path        print the database path
  cfactory db migrate     migrate JSON data to SQLite (merges with existing data)

Posicionais:
  query  SQL query to execute  [string]

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]
  --format   Output format  [string] [opções: "json", "tsv"] [padrão: "tsv"]

cfactory db path

print the database path

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory db migrate

migrate JSON data to SQLite (merges with existing data)

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory config

configuration tools

Comandos:
  cfactory config check  check configuration for warnings and errors

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory config check

check configuration for warnings and errors

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]

cfactory plugin

install plugin and update config

Positionals:
      --module  npm module name  [string]

Opções:
      --help     Exibe ajuda  [booleano]
      --version  Exibe a versão  [booleano]
  -g, --global   install in global config  [booleano] [padrão: false]
  -f, --force    replace existing plugin version  [booleano] [padrão: false]

cfactory help

show full CLI reference

Positionals:
  --command  command to show help for  [string]

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]
  --all      show help for all commands  [booleano] [padrão: false]
  --format   output format  [string] [opções: "md", "text"] [padrão: "md"]

cfactory completion

generate shell completion script

Opções:
  --help     Exibe ajuda  [booleano]
  --version  Exibe a versão  [booleano]