OS Manuals

/usr/bin/gptscript

Develop LLM Apps in Natural Language

From gptscript 0.9.9-r434 (os), captured 2026-11-05 by running gptscript --help (exit 0). permalink

Also provided by 1 other package version
Usage:
  gptscript [flags] PROGRAM_FILE [INPUT...]
  gptscript [command]

Available Commands:
  credential    List stored credentials
  eval
  fmt
  getenv        Looks up an environment variable for use in GPTScript tools
  parse

Flags:
      --cache-dir string                    Directory to store cache (default: $XDG_CACHE_HOME/gptscript) ($GPTSCRIPT_CACHE_DIR)
      --chat-state string                   The chat state to continue, or null to start a new chat and return the state ($GPTSCRIPT_CHAT_STATE)
  -C, --chdir string                        Change current working directory ($GPTSCRIPT_CHDIR)
      --color                               Use color in output (default true) ($GPTSCRIPT_COLOR)
      --config string                       Path to GPTScript config file ($GPTSCRIPT_CONFIG)
      --confirm                             Prompt before running potentially dangerous commands ($GPTSCRIPT_CONFIRM)
      --credential-context strings          Context name(s) in which to store credentials ($GPTSCRIPT_CREDENTIAL_CONTEXT)
      --credential-override strings         Credentials to override (ex: --credential-override github.com/example/cred-tool:API_TOKEN=1234) ($GPTSCRIPT_CREDENTIAL_OVERRIDE)
      --debug                               Enable debug logging ($GPTSCRIPT_DEBUG)
      --debug-messages                      Enable logging of chat completion calls ($GPTSCRIPT_DEBUG_MESSAGES)
      --default-model string                Default LLM model to use ($GPTSCRIPT_DEFAULT_MODEL) (default "gpt-4o")
      --default-model-provider string       Default LLM model provider to use, this will override OpenAI settings ($GPTSCRIPT_DEFAULT_MODEL_PROVIDER)
      --disable-cache                       Disable caching of LLM API responses ($GPTSCRIPT_DISABLE_CACHE)
      --disable-tui                         Don't use chat TUI but instead verbose output ($GPTSCRIPT_DISABLE_TUI)
      --dump-state string                   Dump the internal execution state to a file ($GPTSCRIPT_DUMP_STATE)
      --events-stream-to string             Stream events to this location, could be a file descriptor/handle (e.g. fd://2), filename, or named pipe (e.g. \\.\pipe\my-pipe) ($GPTSCRIPT_EVENTS_STREAM_TO)
      --force-chat                          Force an interactive chat session if even the top level tool is not a chat tool ($GPTSCRIPT_FORCE_CHAT)
      --force-sequential                    Force parallel calls to run sequentially ($GPTSCRIPT_FORCE_SEQUENTIAL)
      --github-enterprise-hostname string   The host name for a Github Enterprise instance to enable for remote loading ($GPTSCRIPT_GITHUB_ENTERPRISE_HOSTNAME)
  -h, --help                                help for gptscript
  -f, --input string                        Read input from a file ("-" for stdin) ($GPTSCRIPT_INPUT_FILE)
      --list-models                         List the models available and exit ($GPTSCRIPT_LIST_MODELS)
      --list-tools                          List built-in tools and exit ($GPTSCRIPT_LIST_TOOLS)
      --no-trunc                            Do not truncate long log messages ($GPTSCRIPT_NO_TRUNC)
      --openai-api-key string               OpenAI API KEY ($OPENAI_API_KEY)
      --openai-base-url string              OpenAI base URL ($OPENAI_BASE_URL)
      --openai-org-id string                OpenAI organization ID ($OPENAI_ORG_ID)
  -o, --output string                       Save output to a file, or - for stdout ($GPTSCRIPT_OUTPUT)
  -q, --quiet                               No output logging (set --quiet=false to force on even when there is no TTY) ($GPTSCRIPT_QUIET)
      --save-chat-state-file string         A file to save the chat state to so that a conversation can be resumed with --chat-state ($GPTSCRIPT_SAVE_CHAT_STATE_FILE)
      --sub-tool string                     Use tool of this name, not the first tool in file ($GPTSCRIPT_SUB_TOOL)
      --system-tools-dir string             Directory that contains system managed tool for which GPTScript will not manage the runtime ($GPTSCRIPT_SYSTEM_TOOLS_DIR)
      --ui                                  Launch the UI ($GPTSCRIPT_UI)
  -v, --version                             version for gptscript
      --workspace string                    Directory to use for the workspace, if specified it will not be deleted on exit ($GPTSCRIPT_WORKSPACE)

Use "gptscript [command] --help" for more information about a command.
Options (35)
OptionDescriptionSource
--cache-dir stringDirectory to store cache (default: $XDG_CACHE_HOME/gptscript) ($GPTSCRIPT_CACHE_DIR)help
--chat-state stringThe chat state to continue, or null to start a new chat and return the state ($GPTSCRIPT_CHAT_STATE)help
-C, --chdir stringChange current working directory ($GPTSCRIPT_CHDIR)help
--colorUse color in output (default true) ($GPTSCRIPT_COLOR)help
--config stringPath to GPTScript config file ($GPTSCRIPT_CONFIG)help
--confirmPrompt before running potentially dangerous commands ($GPTSCRIPT_CONFIRM)help
--credential-context stringsContext name(s) in which to store credentials ($GPTSCRIPT_CREDENTIAL_CONTEXT)help
--credential-override stringsCredentials to override (ex: --credential-override github.com/example/cred-tool:API_TOKEN=1234) ($GPTSCRIPT_CREDENTIAL_OVERRIDE)help
--debugEnable debug logging ($GPTSCRIPT_DEBUG)help
--debug-messagesEnable logging of chat completion calls ($GPTSCRIPT_DEBUG_MESSAGES)help
--default-model stringDefault LLM model to use ($GPTSCRIPT_DEFAULT_MODEL) (default "gpt-4o")help
--default-model-provider stringDefault LLM model provider to use, this will override OpenAI settings ($GPTSCRIPT_DEFAULT_MODEL_PROVIDER)help
--disable-cacheDisable caching of LLM API responses ($GPTSCRIPT_DISABLE_CACHE)help
--disable-tuiDon't use chat TUI but instead verbose output ($GPTSCRIPT_DISABLE_TUI)help
--dump-state stringDump the internal execution state to a file ($GPTSCRIPT_DUMP_STATE)help
--events-stream-to stringStream events to this location, could be a file descriptor/handle (e.g. fd://2), filename, or named pipe (e.g. \\.\pipe\my-pipe) ($GPTSCRIPT_EVENTS_STREAM_TO)help
--force-chatForce an interactive chat session if even the top level tool is not a chat tool ($GPTSCRIPT_FORCE_CHAT)help
--force-sequentialForce parallel calls to run sequentially ($GPTSCRIPT_FORCE_SEQUENTIAL)help
--github-enterprise-hostname stringThe host name for a Github Enterprise instance to enable for remote loading ($GPTSCRIPT_GITHUB_ENTERPRISE_HOSTNAME)help
-h, --helphelp for gptscripthelp
-f, --input stringRead input from a file ("-" for stdin) ($GPTSCRIPT_INPUT_FILE)help
--list-modelsList the models available and exit ($GPTSCRIPT_LIST_MODELS)help
--list-toolsList built-in tools and exit ($GPTSCRIPT_LIST_TOOLS)help
--no-truncDo not truncate long log messages ($GPTSCRIPT_NO_TRUNC)help
--openai-api-key stringOpenAI API KEY ($OPENAI_API_KEY)help
--openai-base-url stringOpenAI base URL ($OPENAI_BASE_URL)help
--openai-org-id stringOpenAI organization ID ($OPENAI_ORG_ID)help
-o, --output stringSave output to a file, or - for stdout ($GPTSCRIPT_OUTPUT)help
-q, --quietNo output logging (set --quiet=false to force on even when there is no TTY) ($GPTSCRIPT_QUIET)help
--save-chat-state-file stringA file to save the chat state to so that a conversation can be resumed with --chat-state ($GPTSCRIPT_SAVE_CHAT_STATE_FILE)help
--sub-tool stringUse tool of this name, not the first tool in file ($GPTSCRIPT_SUB_TOOL)help
--system-tools-dir stringDirectory that contains system managed tool for which GPTScript will not manage the runtime ($GPTSCRIPT_SYSTEM_TOOLS_DIR)help
--uiLaunch the UI ($GPTSCRIPT_UI)help
-v, --versionversion for gptscripthelp
--workspace stringDirectory to use for the workspace, if specified it will not be deleted on exit ($GPTSCRIPT_WORKSPACE)help

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.