Skip to content

CLI Reference

The Octrafic CLI provides several commands and flags to control its behavior from the terminal. This reference covers all available options for version 0.4.x and later.

Global Flags

These flags can be used when starting an interactive session or executing commands.

FlagShortDescriptionExample
--url-uBase URL of the API to test-u https://api.example.com
--spec-sPath or URL to the OpenAPI specification-s ./docs/openapi.yaml
--name-nName of the project (saves the session)-n "Stripe API"
--authAuthentication method (bearer, apikey, basic, none)--auth bearer
--tokenToken for bearer authentication--token "sk_test_..."
--keyHeader name for API key authentication--key "X-API-Key"
--valueValue for API key authentication--value "12345"
--userUsername for basic authentication--user "admin"
--passPassword for basic authentication--pass "secret"
--clear-authRemove saved authentication from the project--clear-auth
--autoStart in Auto Mode (no confirmation prompts)--auto
--onboardingForce the onboarding wizard (provider selection)--onboarding
--version-vPrint the current version-v
--help-hDisplay help information-h

Commands

octrafic test

Executes tests non-interactively (headless mode). Ideal for CI/CD pipelines.

bash
octrafic test [flags]

Additional Flags for test:

FlagShortDescriptionExample
--path-pPath to a test file (Postman config, shell script, pytest)-p ./tests.json
--promptNatural language instruction for generating tests--prompt "Test all GET endpoints"

Note: All global flags (like --url, --spec, --auth) apply to the test command as well.

Exit Codes:

  • 0: All tests passed successfully.
  • 1: One or more tests failed, or an error occurred during execution.

In-Session Commands (Slash Commands)

When using the interactive TUI (Terminal User Interface), you can use these commands by typing them in the chat prompt.

CommandDescription
/helpList all available slash commands and keybindings
/save <name>Save the current temporary project under a name
/autoToggle Auto Mode (skips manual confirmation for requests)
/authOpen the authentication wizard to update API credentials
/modelsSwitch the AI model or provider
/infoDisplay current project configuration (URL, Spec, Auth)
/clearClear the conversation history from the screen
/release-notesDisplay release notes for the current and recent versions
/logoutLog out and clear the current session
/exitExit Octrafic

Keyboard Shortcuts

While in the interactive chat session:

  • Up/Down Arrows: Navigate through command history.
  • Page Up/Page Down: Scroll through the chat output.
  • Tab: Auto-complete file paths when typing.
  • Esc (Double tap): Clear the current input prompt.
  • Ctrl+C: Gracefully exit the application.