Get started

CLI overview

One CLI top-level commands, common subcommands, output modes, and automation contracts.

6 min readUpdated 3 days agoEdit on GitHub

One CLI is a single binary. It creates workspaces, adds projects, manages environment variables and endpoint profiles, runs local dev / container / deployment workflows, and exposes stable JSON output for agents and CI.

Who this page is for: people who just installed One CLI and want to know which commands exist; people who cannot remember a flag.

After reading: you will know each public command's one-line purpose, minimal example, common subcommands, and where to jump next for details.

Top-level commands

CommandPurposeMinimal example
one createScaffold a new workspaceone create my-app
one addAdd a project interactively or from templatesone add
one templatesList available templatesone templates
one envManage dotenv / Infisical environment variablesone env list
one containerInspect, build, and push Dockerfile-driven imagesone container info
one devStart every project's local dev process in parallelone dev
one deployDispatch per-project deploys to kustomize / S3-compatible / Vercel / Cloudflare / EdgeOneone deploy --dry-run
one runRun a command with project .env injectedone run -- npm test
one configureConfigure machine-level endpoint profilesone configure
one serveLaunch the local web UI for human profile editingone serve
one skillsInstall or refresh the bundled one-cli skillone skills install

Create Workspaces

one create [dir] [--name <name>] [--env-provider dotenv|infisical] [--yes]

[dir] is the target directory, not the project name. The default name is basename(dir). Bare one create asks for the target directory and optional project name. dotenv is the default env provider; pass --env-provider infisical explicitly when needed.

Read Create.

Add Projects

one add # open the interactive picker
one templates # see available templates
one add <template-id> --name <project-name> [--deploy-provider <id>] [--yes] # add a specific template and choose a deploy mode

For a first run, use bare one add and follow the interactive picker for category, template, and project name. For explicit commands, run one templates first and put the listed template ID in the one add <template-id> position.

API / SSR templates usually enable container/docker + deploy/kustomize; static web templates usually enable S3-compatible deploy across multiple S3 platforms; mobile, library, and Electron templates do not enable deploy / container by default.

Read Add.

Templates

one templates
one templates -o json

one templates lists bundled templates. Agents and CI should use -o json to read template IDs, categories, toolchains, and compatible backends.

Read Templates.

Environment Variables

one env get <KEY> [--env <env>] [-p <name|path>]
one env set <KEY[=VALUE]> [VALUE] [--env <env>] [-p <name|path>]
one env list [--env <env>] [-p <name|path>]
one env pull [--env <env>] [-p <name|path>] [--force] [--dry-run]

one env dispatches to the workspace's selected env backend. dotenv reads and writes local .env overlays; infisical supports remote get / set / list / pull. --env selects an environment such as dev, staging, or prod. -p / --project selects a project by manifest name or workspace-relative path.

Read Secrets.

Machine Profiles

one configure
one configure add
one configure add <pair> --profile <name> [backend flags...] [--use]
one configure list [pair]
one configure current [pair]
one configure show <pair> --profile <name> [--reveal]
one configure use <pair> --profile <name>
one configure remove <pair> --profile <name>
one configure locale [auto|zh-CN|en-US]

configure manages machine-level endpoint profiles. Bare one configure and one configure add open the interactive wizard. Non-interactive scripts should pass both <pair> and --profile. Configure a profile once on your own machine and reuse it later.

Supported <pair> values:

DomainBackends
envinfisical
containerdocker
containerdockerhub, ghcr, acr
deployaliyun-oss, tencent-cos, aws-s3, minio, rustfs, r2
deploykustomize, vercel, cloudflare, edgeone

env/dotenv is the workspace-local .env backend and does not need a machine-level profile. Profiles are stored in ~/.config/one/config.json and ~/.config/one/credentials.json. Sensitive fields are masked unless you explicitly run show --reveal. When adding tokens, prefer using one serve to configure them so you do not hand tokens to an AI agent.

Interactive Mode At A Glance

CommandInteractive behavior
one createYes; no-arg mode asks for target directory and optional project name
one addYes; no-arg mode picks category, template, project name, and sometimes deploy backend
one configureYes; bare one configure or one configure add opens the profile wizard
one skills installYes; no-arg mode multi-selects target agents
one env setPartial; confirms unknown environments or overwrites, scripts use --yes
one container buildPartial; TTY mode can choose a build version, CI uses --build-version
one deployPartial; kustomize build version or missing Cloudflare profile can ask questions, CI should pass explicit flags
one templates / one dev / one runNo wizard; behavior is controlled by arguments
one serveNot a terminal wizard; it opens a local web UI for manual profile editing

Local Web UI

one serve [--host 127.0.0.1] [--port 0] [--open=false]

Starts a loopback-only HTTP server for humans to edit env / deploy / container profiles in a browser. This path handles API keys, kubeconfig paths, and registry tokens, so it is intentionally not an AI-agent credential-editing interface.

Read Serve.

Containers

one container info
one container build [subproject] [-p <name|path>] [--build-version <version>] [--dry-run] [--profile <name>]
one container push  [subproject] [-p <name|path>] [--build-version <version>] [--dry-run] [--profile <name>]

one container reads each project's Dockerfile and manifest container config. Bare build creates a local <workload>:<version> image. Passing --profile, or pinning a registry profile in the manifest, produces a registry-qualified tag and performs login. push requires a registry profile and can retag the local image before pushing.

Local Development

one dev [-p <name|path>] [--dry-run]

Reads projects[].domains.dev.command from one.manifest.json and starts every project in parallel through the built-in supervisor (no third-party runner needed). -p / --project starts a single project. --dry-run prints the resolved commands without launching them.

Deployment

one deploy [-p <name|path>] [--profile <name>] [--env <env>] [--env-provider dotenv|infisical] [--build-version <version>] [--dry-run]

deploy dispatches each project to the backend declared in the manifest. Backends / SSR projects usually use kustomize; static frontends can use S3-compatible backends; hosted frontends can use Vercel, Cloudflare, or EdgeOne.

--env <name> overrides the deploy target for this run. --dry-run prints the docker / kubectl / S3 / platform CLI plan without touching remote systems.

Run With Env

one run [-p <name|path>] [--env-provider dotenv|infisical] [--env <env>] -- <command> [args...]

Runs the child process in the resolved project directory after injecting secrets. By default it uses the workspace manifest's env provider; pass --env-provider to force dotenv or Infisical.

Agent Skills

one skills install # choose target AI agents interactively
one skills install --yes
one skills install --agent claude-code # install skills for a specific AI agent

Installs or refreshes the bundled one-cli skill into detected coding agents.

SkillPurpose
one-cliCreate workspaces, add template projects, install missing dependencies, and look up commands / JSON / error codes

Read Install skill to agent.

Output Modes

Every command supports the same output flags:

TriggerMode
-o json or --output jsonForce pretty-printed JSON
-o yaml or --output yamlForce YAML with the same schema as JSON
-o text or --output textForce human output
Default + pipe / non-TTYJSON
Default + TTYColored human output

Running one templates directly shows terminal-friendly output. Agents and CI get JSON by default when reading through a pipe. Scripts should still pass -o json explicitly so parsing does not depend on the execution environment.

Meta Commands

one --version
one --help
one <command> --help

one --help shows only top-level commands. Use one <command> --help for exact flags, and read Error codes for structured failures.