Common Commands
The day-to-day Theneo CLI commands, grouped by what you’re doing. Each comes with its --help reference and copy-paste examples.
Log in
theneo login
Log in with an API key:
theneo login --token <theneo-api-key>
You can also set the THENEO_API_KEY environment variable instead of logging in interactively.
Create a project
Usage: theneo project create [options]
Create new project
Options:
--name <name> Project name
--workspace <workspace> Workspace slug to create the project in (uses default if absent)
-f, --file <file> API file path to import (eg: docs/openapi.yml)
--link <link> API file URL to create the project using it
--postman-api-key <postman-api-key> Postman API Key (env: THENEO_POSTMAN_API_KEY)
--postman-collection <postman-collection> Postman collection id, you can use multiple times
--empty Creates empty project (default: false)
--sample Creates project with sample template (default: false)
--publish Publish the project after creation (default: false)
--public Make published documentation publicly accessible (default: false)
--generate-description <generate-description> Use AI for description generation (choices: "fill", "overwrite", "no_generation", default: "no_generation")
--profile <string> Use a specific profile from your config file.
-h, --help display help for command
From a spec file:
theneo project create --name api-documentation --generate-description overwrite --publish --public --file ./examples/openapi-spec.json
From a link, or from Postman collections:
theneo project create --name api-documentation --generate-description fill --publish --public --link https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/uspto.json
theneo project create --name api-documentation --postman-api-key <key> --postman-collection <id-1> --postman-collection <id-2>
Update documentation from a spec
Usage: theneo project import [options]
Import updated documentation into Theneo using file, link or postman collection
Options:
--project <project-slug> Project slug to import updated documentation in
-f, --file <file> API file path to import (eg: docs/openapi.yml)
--link <url> API file URL to create the project using it
--postman-api-key <postman-api-key> Postman API Key (env: THENEO_POSTMAN_API_KEY)
--postman-collection <postman-collection> Postman collection id, you can use multiple times
--import-type <import-type> How the new spec is imported (choices: "endpoints", "overwrite", "append", "merge", "merge_v2")
--description-merge-strategy <strategy> For merge_v2: keep_new / keep_old (default: keep_new)
--publish Automatically publish the project (default: false)
--workspace <workspace-slug> Workspace slug where the project is located
--projectVersion <version-slug> Project version slug to import to (uses default if absent)
--keepOldParameterDescription Keep old parameter descriptions during merge
--keepOldSectionDescription Keep old section descriptions during merge
--generate-description <generate-description> AI description generation (choices: "fill", "overwrite", "no_generation", default: "no_generation")
--tab <tab-slug> Import into a specific tab only
--profile <string> Use a specific profile from your config file.
-h, --help display help for command
A simple update, or a controlled merge:
theneo project import --file <file> --project <project-slug> --publish
theneo project import --project <project-slug> \
--workspace <workspace-slug> \
--projectVersion <version-slug> \
--publish \
--file ./api-spec.json \
--import-type merge \
--keepOldParameterDescription \
--keepOldSectionDescription
Publish or delete a project
theneo project publish --project <project-slug>
theneo project delete --project <project-slug>
List & create versions
Usage: theneo version [options] [command] <action>
Project version related commands
Commands:
list [options] List project versions
create [options]
delete [options]
help [command] display help for command
Usage: theneo version create [options]
Options:
--name <name> Name of the version
--project <project-slug> Project slug to create the version for
--workspace <workspace-slug> Workspace slug where the project is
--previousVersion <previous-version-slug> Previous version slug to duplicate content from
--profile <string> Use a specific profile from your config file.
-h, --help display help for command
Add a changelog subscriber
Usage: theneo version add-subscriber [options]
Add a subscriber for project changelog
Options:
--project <project-slug> Project slug
--workspace <workspace-slug> Workspace slug
--projectVersion <version-slug> Project version slug
--email <email> Email of the new changelog subscriber
--profile <string> Use a specific profile from your config file.
-h, --help display help for command
Migrate existing docs
Usage: theneo migrate [options]
Convert existing docs (GitBook, Mintlify, Docusaurus, MkDocs, Markdown) into a Theneo project with your AI coding agent
Options:
--dir <directory> Folder that holds your current docs (default: current directory)
--out <directory> Folder the agent writes the Theneo project to (default: "converted_for_theneo")
--agent <agent> Coding agent to set up (choices: "claude-code", "cursor", "codex", "gemini", "copilot", "windsurf", "other")
--no-launch Install the skill and print the prompt only
--force Replace an installed skill that differs, and allow a non-empty output folder
-h, --help display help for command
Run it in the folder that holds your docs:
theneo migrate
theneo migrate --agent claude-code
theneo migrate --dir ./website/docs --agent cursor --no-launch
It works with docs from any platform. The CLI installs the docs-to-theneo skill for your agent and gives it a prompt. The agent writes the Theneo project to converted_for_theneo/ and checks it with theneo audit. It asks before it previews or imports anything, and never publishes. Available from CLI version 0.25.0. See Migrate with an AI Agent for the full walkthrough.
Run the latest main-branch build
Clone the repository, then install and run the CLI:
git clone git@github.com:Theneo-Inc/theneo-tools.git
nvm use
npm install
npm run cli
theneo help
Environment variables
THENEO_API_KEY=<theneo-api-key> THENEO_API_URL=https://api.theneo.io THENEO_APP_URL=https://app.theneo.io theneo <command>
Config file & profiles
theneo login --profile <profile-name> --token <theneo-api-key> --api-url https://api.theneo.io --app-url https://app.theneo.io
Your config file lives at .config/theneo/config.
Branches and previews
Available from CLI version 0.24.0. Branches and previews need the Documentation Review feature for your workspace; see Branches & Preview Deployments for every option.
# Publish a Markdown folder to a temporary preview branch and get a preview link
theneo preview --project <project-slug> --dir ./docs
# List, create, rebase, link, publish, or abandon branches
theneo branch list --project <project-slug>
theneo branch create --name <name> --project <project-slug>
theneo branch rebase --branch <branch-id>
theneo branch link --branch <branch-id>
theneo branch publish --branch <branch-id>
theneo branch delete --branch <branch-id>
# Import a Markdown folder into an existing branch
theneo import --project <project-slug> --dir ./docs --branch <branch-id>
On this page
- Common Commands