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
Bash
theneo login
Log in with an API key:
Bash
theneo login --token <theneo-api-key>
You can also set the THENEO_API_KEY environment variable instead of logging in interactively.
Create a project
Theneo project create --help
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:
Bash
theneo project create --name api-documentation --generate-description overwrite --publish --public --file ./examples/openapi-spec.json
From a link, or from Postman collections:
Bash
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
Theneo project import --help
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 <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
--import-type <import-type> How the new spec is imported (choices: "endpoints", "overwrite", "append", "merge_v2")
--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
--profile <string> Use a specific profile from your config file.
-h, --help display help for command
A simple update, or a controlled merge:
Bash
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_v2 \
--keepOldParameterDescription \
--keepOldSectionDescription
Publish or delete a project
Bash
theneo project publish --project <project-slug>
theneo project delete --project <project-slug>
List & create versions
Theneo version --help
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
Theneo version create --help
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
Theneo version add-subscriber --help
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
Run the latest main-branch build
Clone the repository, then install and run the CLI:
Bash
git clone git@github.com:Theneo-Inc/theneo-tools.git
nvm use
npm install
npm run cli
theneo help
Environment variables
Bash
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
Bash
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.
Was this section helpful?
On this page
- Common Commands